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

Input: touchscreen - use platform_{get,set}_drvdata()

Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Jingoo Han and committed by
Dmitry Torokhov
edbbee59 35c4b122

+2 -2
+1 -1
drivers/input/touchscreen/88pm860x-ts.c
··· 237 237 touch = kzalloc(sizeof(struct pm860x_touch), GFP_KERNEL); 238 238 if (touch == NULL) 239 239 return -ENOMEM; 240 - dev_set_drvdata(&pdev->dev, touch); 240 + platform_set_drvdata(pdev, touch); 241 241 242 242 touch->idev = input_allocate_device(); 243 243 if (touch->idev == NULL) {
+1 -1
drivers/input/touchscreen/atmel_tsadcc.c
··· 325 325 326 326 static int atmel_tsadcc_remove(struct platform_device *pdev) 327 327 { 328 - struct atmel_tsadcc *ts_dev = dev_get_drvdata(&pdev->dev); 328 + struct atmel_tsadcc *ts_dev = platform_get_drvdata(pdev); 329 329 struct resource *res; 330 330 331 331 free_irq(ts_dev->irq, ts_dev);