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: ads7846 - use kobj_to_dev() API

Use kobj_to_dev() instead of container_of().

Signed-off-by: Wang Qing <wangqing@vivo.com>
Link: https://lore.kernel.org/r/1604893436-20206-1-git-send-email-wangqing@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Wang Qing and committed by
Dmitry Torokhov
3fe781f4 af5689fb

+1 -1
+1 -1
drivers/input/touchscreen/ads7846.c
··· 481 481 static umode_t ads7846_is_visible(struct kobject *kobj, struct attribute *attr, 482 482 int index) 483 483 { 484 - struct device *dev = container_of(kobj, struct device, kobj); 484 + struct device *dev = kobj_to_dev(kobj); 485 485 struct ads7846 *ts = dev_get_drvdata(dev); 486 486 487 487 if (ts->model == 7843 && index < 2) /* in0, in1 */