mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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: [email protected] Cc: [email protected] Acked-by: Chris Wright <[email protected]> Cc: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
839214aeaa
commit
1b713e0050
3 changed files with 13 additions and 13 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue