diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-05-04 12:40:54 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-15 21:30:28 -0700 |
commit | 1b713e00500c6f03317742981674e89a21629399 (patch) | |
tree | 28effcbb622d14f72b3d2059c6a7db6b0ec124a6 /drivers/input | |
parent | 839214aeaae1866d55e745c676206825f8ba7e99 (diff) | |
download | linux-3.10-1b713e00500c6f03317742981674e89a21629399.tar.gz linux-3.10-1b713e00500c6f03317742981674e89a21629399.tar.bz2 linux-3.10-1b713e00500c6f03317742981674e89a21629399.zip |
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')
-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 928d2ed8865..b115726dc08 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, xenbus_dev_fatal(dev, -ENOMEM, "allocating info structure"); return -ENOMEM; } - dev->dev.driver_data = info; + dev_set_drvdata(&dev->dev, info); info->xbdev = dev; info->irq = -1; snprintf(info->phys, sizeof(info->phys), "xenbus/%s", dev->nodename); @@ -186,7 +186,7 @@ static int __devinit xenkbd_probe(struct xenbus_device *dev, static int xenkbd_resume(struct xenbus_device *dev) { - struct xenkbd_info *info = dev->dev.driver_data; + struct xenkbd_info *info = dev_get_drvdata(&dev->dev); xenkbd_disconnect_backend(info); memset(info->page, 0, PAGE_SIZE); @@ -195,7 +195,7 @@ static int xenkbd_resume(struct xenbus_device *dev) static int xenkbd_remove(struct xenbus_device *dev) { - struct xenkbd_info *info = dev->dev.driver_data; + struct xenkbd_info *info = dev_get_drvdata(&dev->dev); xenkbd_disconnect_backend(info); if (info->kbd) @@ -266,7 +266,7 @@ static void xenkbd_disconnect_backend(struct xenkbd_info *info) static void xenkbd_backend_changed(struct xenbus_device *dev, enum xenbus_state backend_state) { - struct xenkbd_info *info = dev->dev.driver_data; + struct xenkbd_info *info = dev_get_drvdata(&dev->dev); int ret, val; switch (backend_state) { |