Skip to content

Commit dc830a6

Browse files
committed
Kernel module atmel_mxt: align with new probe prototype
1 parent 3295ae9 commit dc830a6

File tree

1 file changed

+15
-10
lines changed
  • meta-arduino-bsp/recipes-kernel/kernel-modules/atmel-mxt-ts

1 file changed

+15
-10
lines changed

meta-arduino-bsp/recipes-kernel/kernel-modules/atmel-mxt-ts/atmel_mxt_ts.c

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3082,11 +3082,25 @@ static const struct dmi_system_id chromebook_T9_suspend_dmi[] = {
30823082
{ }
30833083
};
30843084

3085-
static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id)
3085+
static const struct i2c_device_id mxt_id[] = {
3086+
{ "qt602240_ts", 0 },
3087+
{ "atmel_mxt_ts", 0 },
3088+
{ "atmel_mxt_tp", 0 },
3089+
{ "maxtouch", 0 },
3090+
{ "mXT224", 0 },
3091+
{ }
3092+
};
3093+
MODULE_DEVICE_TABLE(i2c, mxt_id);
3094+
3095+
static int mxt_probe(struct i2c_client *client)
30863096
{
30873097
struct mxt_data *data;
30883098
int error;
30893099

3100+
const struct i2c_device_id *id = i2c_match_id(mxt_id, client);
3101+
3102+
if (!id)
3103+
return -ENODEV;
30903104
/*
30913105
* Ignore devices that do not have device properties attached to
30923106
* them, as we need help determining whether we are dealing with
@@ -3251,15 +3265,6 @@ static const struct acpi_device_id mxt_acpi_id[] = {
32513265
MODULE_DEVICE_TABLE(acpi, mxt_acpi_id);
32523266
#endif
32533267

3254-
static const struct i2c_device_id mxt_id[] = {
3255-
{ "qt602240_ts", 0 },
3256-
{ "atmel_mxt_ts", 0 },
3257-
{ "atmel_mxt_tp", 0 },
3258-
{ "maxtouch", 0 },
3259-
{ "mXT224", 0 },
3260-
{ }
3261-
};
3262-
MODULE_DEVICE_TABLE(i2c, mxt_id);
32633268

32643269
static struct i2c_driver mxt_driver = {
32653270
.driver = {

0 commit comments

Comments
 (0)