* [PATCH] input: remove driver_data direct access of struct device
@ 2009-04-30 22:17 Greg Kroah-Hartman
2009-05-01 13:30 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Greg Kroah-Hartman @ 2009-04-30 22:17 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, Greg KH
From: Greg Kroah-Hartman <gregkh@suse.de>
In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device. Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used. These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/input/touchscreen/wm97xx-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/input/touchscreen/wm97xx-core.c
+++ b/drivers/input/touchscreen/wm97xx-core.c
@@ -569,7 +569,7 @@ static int wm97xx_probe(struct device *d
mutex_init(&wm->codec_mutex);
wm->dev = dev;
- dev->driver_data = wm;
+ dev_set_drvdata(dev, wm);
wm->ac97 = to_ac97_t(dev);
/* check that we have a supported codec */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] input: remove driver_data direct access of struct device
2009-04-30 22:17 [PATCH] input: remove driver_data direct access of struct device Greg Kroah-Hartman
@ 2009-05-01 13:30 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2009-05-01 13:30 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-input, Greg KH
On Thu, Apr 30, 2009 at 03:17:30PM -0700, Greg Kroah-Hartman wrote:
> From: Greg Kroah-Hartman <gregkh@suse.de>
>
> In the near future, the driver core is going to not allow direct access
> to the driver_data pointer in struct device. Instead, the functions
> dev_get_drvdata() and dev_set_drvdata() should be used. These functions
> have been around since the beginning, so are backwards compatible with
> all older kernel versions.
>
Applied to my 'next' branch, thanks Greg.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-01 13:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-30 22:17 [PATCH] input: remove driver_data direct access of struct device Greg Kroah-Hartman
2009-05-01 13:30 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).