Commit edbbee59 authored by Jingoo Han's avatar Jingoo Han Committed by Dmitry Torokhov

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: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 35c4b122
...@@ -237,7 +237,7 @@ static int pm860x_touch_probe(struct platform_device *pdev) ...@@ -237,7 +237,7 @@ static int pm860x_touch_probe(struct platform_device *pdev)
touch = kzalloc(sizeof(struct pm860x_touch), GFP_KERNEL); touch = kzalloc(sizeof(struct pm860x_touch), GFP_KERNEL);
if (touch == NULL) if (touch == NULL)
return -ENOMEM; return -ENOMEM;
dev_set_drvdata(&pdev->dev, touch); platform_set_drvdata(pdev, touch);
touch->idev = input_allocate_device(); touch->idev = input_allocate_device();
if (touch->idev == NULL) { if (touch->idev == NULL) {
......
...@@ -325,7 +325,7 @@ static int atmel_tsadcc_probe(struct platform_device *pdev) ...@@ -325,7 +325,7 @@ static int atmel_tsadcc_probe(struct platform_device *pdev)
static int atmel_tsadcc_remove(struct platform_device *pdev) 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; struct resource *res;
free_irq(ts_dev->irq, ts_dev); free_irq(ts_dev->irq, ts_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment