Input: touchscreen - use platform_{get,set}_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Thu, 23 May 2013 16:20:26 +0000 (09:20 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 23 May 2013 16:34:17 +0000 (09:34 -0700)
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>
drivers/input/touchscreen/88pm860x-ts.c
drivers/input/touchscreen/atmel_tsadcc.c

index e8d457266b7185833c0eaf34787a12c9219beb7f..f7de14a268bfc577b5dbc62abcccb3294de33f85 100644 (file)
@@ -237,7 +237,7 @@ static int pm860x_touch_probe(struct platform_device *pdev)
        touch = kzalloc(sizeof(struct pm860x_touch), GFP_KERNEL);
        if (touch == NULL)
                return -ENOMEM;
-       dev_set_drvdata(&pdev->dev, touch);
+       platform_set_drvdata(pdev, touch);
 
        touch->idev = input_allocate_device();
        if (touch->idev == NULL) {
index 95f6785a94b02ecf6ef64be0d638a7ef7a82c063..75a0693a3f91887920320690303e991dde8cc2c3 100644 (file)
@@ -325,7 +325,7 @@ err_free_mem:
 
 static int atmel_tsadcc_remove(struct platform_device *pdev)
 {
-       struct atmel_tsadcc *ts_dev = dev_get_drvdata(&pdev->dev);
+       struct atmel_tsadcc *ts_dev = platform_get_drvdata(pdev);
        struct resource *res;
 
        free_irq(ts_dev->irq, ts_dev);