Skip to content

Commit d62312d

Browse files
committed
Input: atmel_mxt_ts - use of_match_ptr rather than ifdefs
Signed-off-by: Nick Dyer <[email protected]>
1 parent c7643a5 commit d62312d

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

drivers/input/touchscreen/atmel_mxt_ts.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3342,15 +3342,11 @@ static int mxt_resume(struct device *dev)
33423342

33433343
static SIMPLE_DEV_PM_OPS(mxt_pm_ops, mxt_suspend, mxt_resume);
33443344

3345-
#ifdef CONFIG_OF
33463345
static const struct of_device_id mxt_of_match[] = {
33473346
{ .compatible = "atmel,maxtouch", },
33483347
{},
33493348
};
33503349
MODULE_DEVICE_TABLE(of, mxt_of_match);
3351-
#else
3352-
#define mxt_of_match NULL
3353-
#endif
33543350

33553351
static const struct i2c_device_id mxt_id[] = {
33563352
{ "qt602240_ts", 0 },
@@ -3365,7 +3361,7 @@ static struct i2c_driver mxt_driver = {
33653361
.driver = {
33663362
.name = "atmel_mxt_ts",
33673363
.owner = THIS_MODULE,
3368-
.of_match_table = mxt_of_match,
3364+
.of_match_table = of_match_ptr(mxt_of_match),
33693365
.pm = &mxt_pm_ops,
33703366
},
33713367
.probe = mxt_probe,

0 commit comments

Comments
 (0)