Skip to content

Commit

Permalink
Input: touchscreen - use platform_{get,set}_drvdata()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jingoo Han authored and Dmitry Torokhov committed May 23, 2013
1 parent 35c4b12 commit edbbee5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/88pm860x-ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/atmel_tsadcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ static int atmel_tsadcc_probe(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;

free_irq(ts_dev->irq, ts_dev);
Expand Down

0 comments on commit edbbee5

Please sign in to comment.