diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-05-04 15:40:54 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-16 00:30:28 -0400 |
commit | 1b713e00500c6f03317742981674e89a21629399 (patch) | |
tree | 28effcbb622d14f72b3d2059c6a7db6b0ec124a6 /drivers/input/xen-kbdfront.c | |
parent | 839214aeaae1866d55e745c676206825f8ba7e99 (diff) |
xen: remove driver_data direct access of struct device from more drivers
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: xen-devel@lists.xensource.com
Cc: virtualization@lists.osdl.org
Acked-by: Chris Wright <chrisw@sous-sol.org>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/input/xen-kbdfront.c')
-rw-r--r-- | drivers/input/xen-kbdfront.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/xen-kbdfront.c b/drivers/input/xen-kbdfront.c index 928d2ed8865f..b115726dc088 100644 --- a/drivers/input/xen-kbdfront.c +++ b/drivers/input/xen-kbdfront.c | |||
@@ -114,7 +114,7 @@ static int __devinit xenkbd_probe(struct xenbus_device *dev, | |||
114 | xenbus_dev_fatal(dev, -ENOMEM, "allocating info structure"); | 114 | xenbus_dev_fatal(dev, -ENOMEM, "allocating info structure"); |
115 | return -ENOMEM; | 115 | return -ENOMEM; |
116 | } | 116 | } |
117 | dev->dev.driver_data = info; | 117 | dev_set_drvdata(&dev->dev, info); |
118 | info->xbdev = dev; | 118 | info->xbdev = dev; |
119 | info->irq = -1; | 119 | info->irq = -1; |
120 | snprintf(info->phys, sizeof(info->phys), "xenbus/%s", dev->nodename); | 120 | snprintf(info->phys, sizeof(info->phys), "xenbus/%s", dev->nodename); |
@@ -186,7 +186,7 @@ static int __devinit xenkbd_probe(struct xenbus_device *dev, | |||
186 | 186 | ||
187 | static int xenkbd_resume(struct xenbus_device *dev) | 187 | static int xenkbd_resume(struct xenbus_device *dev) |
188 | { | 188 | { |
189 | struct xenkbd_info *info = dev->dev.driver_data; | 189 | struct xenkbd_info *info = dev_get_drvdata(&dev->dev); |
190 | 190 | ||
191 | xenkbd_disconnect_backend(info); | 191 | xenkbd_disconnect_backend(info); |
192 | memset(info->page, 0, PAGE_SIZE); | 192 | memset(info->page, 0, PAGE_SIZE); |
@@ -195,7 +195,7 @@ static int xenkbd_resume(struct xenbus_device *dev) | |||
195 | 195 | ||
196 | static int xenkbd_remove(struct xenbus_device *dev) | 196 | static int xenkbd_remove(struct xenbus_device *dev) |
197 | { | 197 | { |
198 | struct xenkbd_info *info = dev->dev.driver_data; | 198 | struct xenkbd_info *info = dev_get_drvdata(&dev->dev); |
199 | 199 | ||
200 | xenkbd_disconnect_backend(info); | 200 | xenkbd_disconnect_backend(info); |
201 | if (info->kbd) | 201 | if (info->kbd) |
@@ -266,7 +266,7 @@ static void xenkbd_disconnect_backend(struct xenkbd_info *info) | |||
266 | static void xenkbd_backend_changed(struct xenbus_device *dev, | 266 | static void xenkbd_backend_changed(struct xenbus_device *dev, |
267 | enum xenbus_state backend_state) | 267 | enum xenbus_state backend_state) |
268 | { | 268 | { |
269 | struct xenkbd_info *info = dev->dev.driver_data; | 269 | struct xenkbd_info *info = dev_get_drvdata(&dev->dev); |
270 | int ret, val; | 270 | int ret, val; |
271 | 271 | ||
272 | switch (backend_state) { | 272 | switch (backend_state) { |