[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180419140641.27926-23-wsa+renesas@sang-engineering.com>
Date: Thu, 19 Apr 2018 16:05:52 +0200
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
To: linux-kernel@...r.kernel.org
Cc: linux-renesas-soc@...r.kernel.org, kernel-janitors@...r.kernel.org,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
linux-input@...r.kernel.org
Subject: [PATCH 22/61] input: mouse: simplify getting .drvdata
We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.
Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
---
Build tested only. buildbot is happy. Please apply individually.
drivers/input/mouse/navpoint.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/input/mouse/navpoint.c b/drivers/input/mouse/navpoint.c
index d6e8f58a1de3..3d83a79e14d9 100644
--- a/drivers/input/mouse/navpoint.c
+++ b/drivers/input/mouse/navpoint.c
@@ -320,8 +320,7 @@ static int navpoint_remove(struct platform_device *pdev)
static int __maybe_unused navpoint_suspend(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct navpoint *navpoint = platform_get_drvdata(pdev);
+ struct navpoint *navpoint = dev_get_drvdata(dev);
struct input_dev *input = navpoint->input;
mutex_lock(&input->mutex);
@@ -334,8 +333,7 @@ static int __maybe_unused navpoint_suspend(struct device *dev)
static int __maybe_unused navpoint_resume(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct navpoint *navpoint = platform_get_drvdata(pdev);
+ struct navpoint *navpoint = dev_get_drvdata(dev);
struct input_dev *input = navpoint->input;
mutex_lock(&input->mutex);
--
2.11.0
Powered by blists - more mailing lists