Commit 5cf6e4f6 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge Committed by Konrad Rzeszutek Wilk

xen/blkback: use drv_get/set_drvdata rather than directly accessing driver_data.

Direct driver_data access is obsolete and will disappear.
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
parent e7579a99
...@@ -105,7 +105,7 @@ static void update_blkif_status(blkif_t *blkif) ...@@ -105,7 +105,7 @@ static void update_blkif_status(blkif_t *blkif)
char *buf) \ char *buf) \
{ \ { \
struct xenbus_device *dev = to_xenbus_device(_dev); \ struct xenbus_device *dev = to_xenbus_device(_dev); \
struct backend_info *be = dev->dev.driver_data; \ struct backend_info *be = dev_get_drvdata(&dev->dev); \
\ \
return sprintf(buf, format, ##args); \ return sprintf(buf, format, ##args); \
} \ } \
...@@ -169,7 +169,7 @@ void xenvbd_sysfs_delif(struct xenbus_device *dev) ...@@ -169,7 +169,7 @@ void xenvbd_sysfs_delif(struct xenbus_device *dev)
static int blkback_remove(struct xenbus_device *dev) static int blkback_remove(struct xenbus_device *dev)
{ {
struct backend_info *be = dev->dev.driver_data; struct backend_info *be = dev_get_drvdata(&dev->dev);
DPRINTK(""); DPRINTK("");
...@@ -190,7 +190,7 @@ static int blkback_remove(struct xenbus_device *dev) ...@@ -190,7 +190,7 @@ static int blkback_remove(struct xenbus_device *dev)
} }
kfree(be); kfree(be);
dev->dev.driver_data = NULL; dev_set_drvdata(&dev->dev, NULL);
return 0; return 0;
} }
...@@ -225,7 +225,7 @@ static int blkback_probe(struct xenbus_device *dev, ...@@ -225,7 +225,7 @@ static int blkback_probe(struct xenbus_device *dev,
return -ENOMEM; return -ENOMEM;
} }
be->dev = dev; be->dev = dev;
dev->dev.driver_data = be; dev_set_drvdata(&dev->dev, be);
be->blkif = blkif_alloc(dev->otherend_id); be->blkif = blkif_alloc(dev->otherend_id);
if (IS_ERR(be->blkif)) { if (IS_ERR(be->blkif)) {
...@@ -348,7 +348,7 @@ static void backend_changed(struct xenbus_watch *watch, ...@@ -348,7 +348,7 @@ static void backend_changed(struct xenbus_watch *watch,
static void frontend_changed(struct xenbus_device *dev, static void frontend_changed(struct xenbus_device *dev,
enum xenbus_state frontend_state) enum xenbus_state frontend_state)
{ {
struct backend_info *be = dev->dev.driver_data; struct backend_info *be = dev_get_drvdata(&dev->dev);
int err; int err;
DPRINTK("%s", xenbus_strstate(frontend_state)); DPRINTK("%s", xenbus_strstate(frontend_state));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment