Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: pixcir_i2c_ts - simplify code with of_device_get_match_data

The usage of of_device_get_match_data reduce the code size a bit.
Furthermore, it is better to use a standard function for
getting the match data.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

LABBE Corentin and committed by
Dmitry Torokhov
8ffef3cc d1871654

+1 -7
+1 -7
drivers/input/touchscreen/pixcir_i2c_ts.c
··· 431 431 static int pixcir_parse_dt(struct device *dev, 432 432 struct pixcir_i2c_ts_data *tsdata) 433 433 { 434 - const struct of_device_id *match; 435 - 436 - match = of_match_device(of_match_ptr(pixcir_of_match), dev); 437 - if (!match) 438 - return -EINVAL; 439 - 440 - tsdata->chip = (const struct pixcir_i2c_chip_data *)match->data; 434 + tsdata->chip = of_device_get_match_data(dev); 441 435 if (!tsdata->chip) 442 436 return -EINVAL; 443 437