diff options
author | Hannes Reinecke <hare@suse.de> | 2018-09-28 08:17:19 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-09-28 08:30:28 -0600 |
commit | fef912bf860e8e7e48a2bfb978a356bba743a8b7 (patch) | |
tree | 5cc5e4a4a02c9b898a1afc8e056664b762a1c852 /drivers/block/virtio_blk.c | |
parent | 6c3b7af1c975b87b86dcb2af233d1ae21eb05107 (diff) | |
download | talos-op-linux-fef912bf860e8e7e48a2bfb978a356bba743a8b7.tar.gz talos-op-linux-fef912bf860e8e7e48a2bfb978a356bba743a8b7.zip |
block: genhd: add 'groups' argument to device_add_disk
Update device_add_disk() to take an 'groups' argument so that
individual drivers can register a device with additional sysfs
attributes.
This avoids race condition the driver would otherwise have if these
groups were to be created with sysfs_add_groups().
Signed-off-by: Martin Wilck <martin.wilck@suse.com>
Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/virtio_blk.c')
-rw-r--r-- | drivers/block/virtio_blk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 23752dc99b00..fe80560000a1 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -780,7 +780,7 @@ static int virtblk_probe(struct virtio_device *vdev) virtblk_update_capacity(vblk, false); virtio_device_ready(vdev); - device_add_disk(&vdev->dev, vblk->disk); + device_add_disk(&vdev->dev, vblk->disk, NULL); err = device_create_file(disk_to_dev(vblk->disk), &dev_attr_serial); if (err) goto out_del_disk; |