mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
6c3b7af1c9
commit
fef912bf86
28 changed files with 43 additions and 33 deletions
|
|
@ -76,7 +76,7 @@ int dasd_gendisk_alloc(struct dasd_block *block)
|
|||
gdp->queue = block->request_queue;
|
||||
block->gdp = gdp;
|
||||
set_capacity(block->gdp, 0);
|
||||
device_add_disk(&base->cdev->dev, block->gdp);
|
||||
device_add_disk(&base->cdev->dev, block->gdp, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -685,7 +685,7 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char
|
|||
}
|
||||
|
||||
get_device(&dev_info->dev);
|
||||
device_add_disk(&dev_info->dev, dev_info->gd);
|
||||
device_add_disk(&dev_info->dev, dev_info->gd, NULL);
|
||||
|
||||
switch (dev_info->segment_type) {
|
||||
case SEG_TYPE_SR:
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ int scm_blk_dev_setup(struct scm_blk_dev *bdev, struct scm_device *scmdev)
|
|||
|
||||
/* 512 byte sectors */
|
||||
set_capacity(bdev->gendisk, scmdev->size >> 9);
|
||||
device_add_disk(&scmdev->dev, bdev->gendisk);
|
||||
device_add_disk(&scmdev->dev, bdev->gendisk, NULL);
|
||||
return 0;
|
||||
|
||||
out_queue:
|
||||
|
|
|
|||
Loading…
Reference in a new issue