mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 14:21:47 +00:00
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>
This commit is contained in:
parent
af5689fb5c
commit
3fe781f4fa
@ -481,7 +481,7 @@ SHOW(in1_input, vbatt, vbatt_adjust)
|
||||
static umode_t ads7846_is_visible(struct kobject *kobj, struct attribute *attr,
|
||||
int index)
|
||||
{
|
||||
struct device *dev = container_of(kobj, struct device, kobj);
|
||||
struct device *dev = kobj_to_dev(kobj);
|
||||
struct ads7846 *ts = dev_get_drvdata(dev);
|
||||
|
||||
if (ts->model == 7843 && index < 2) /* in0, in1 */
|
||||
|
Loading…
Reference in New Issue
Block a user