summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2015-10-16 21:11:25 +0300
committerIlya Dryomov <idryomov@gmail.com>2015-11-03 01:36:48 +0300
commit6cac4695f2042a1d0e17aa48c5705f69907e74c3 (patch)
tree92169d02346e418d7fd330aecf0864491c292655 /drivers
parentdd5ac32d425f881624bfe59c8e00dd1c3ccc6bb1 (diff)
downloadlinux-6cac4695f2042a1d0e17aa48c5705f69907e74c3.tar.xz
rbd: set device_type::release instead of device::release
No point in providing an empty device_type::release callback and then setting device::release for each rbd_dev dynamically. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/rbd.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index fd7bd876b3ca..6eec200fa3b3 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -3989,14 +3989,12 @@ static const struct attribute_group *rbd_attr_groups[] = {
NULL
};
-static void rbd_sysfs_dev_release(struct device *dev)
-{
-}
+static void rbd_dev_release(struct device *dev);
static struct device_type rbd_device_type = {
.name = "rbd",
.groups = rbd_attr_groups,
- .release = rbd_sysfs_dev_release,
+ .release = rbd_dev_release,
};
static struct rbd_spec *rbd_spec_get(struct rbd_spec *spec)
@@ -4077,7 +4075,6 @@ static struct rbd_device *rbd_dev_create(struct rbd_client *rbdc,
rbd_dev->dev.bus = &rbd_bus_type;
rbd_dev->dev.type = &rbd_device_type;
rbd_dev->dev.parent = &rbd_root_dev;
- rbd_dev->dev.release = rbd_dev_release;
device_initialize(&rbd_dev->dev);
rbd_dev->rbd_client = rbdc;