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
|
|
@ -2146,7 +2146,7 @@ static int msb_init_disk(struct memstick_dev *card)
|
|||
set_disk_ro(msb->disk, 1);
|
||||
|
||||
msb_start(card);
|
||||
device_add_disk(&card->dev, msb->disk);
|
||||
device_add_disk(&card->dev, msb->disk, NULL);
|
||||
dbg("Disk added");
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -1236,7 +1236,7 @@ static int mspro_block_init_disk(struct memstick_dev *card)
|
|||
set_capacity(msb->disk, capacity);
|
||||
dev_dbg(&card->dev, "capacity set %ld\n", capacity);
|
||||
|
||||
device_add_disk(&card->dev, msb->disk);
|
||||
device_add_disk(&card->dev, msb->disk, NULL);
|
||||
msb->active = 1;
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue