block: convert to device_add_disk()
authorDan Williams <dan.j.williams@intel.com>
Thu, 16 Jun 2016 02:44:20 +0000 (19:44 -0700)
committerDan Williams <dan.j.williams@intel.com>
Mon, 27 Jun 2016 19:26:08 +0000 (12:26 -0700)
commit0d52c756a665adc032c791307bc55e392b0186b3
treea554db0e9ba23afe321e8f084c3a31777ea068b6
parentd72a57835c92f6d51863b0ad6d7d45e3859e24d4
block: convert to device_add_disk()

For block drivers that specify a parent device, convert them to use
device_add_disk().

This conversion was done with the following semantic patch:

    @@
    struct gendisk *disk;
    expression E;
    @@

    - disk->driverfs_dev = E;
    ...
    - add_disk(disk);
    + device_add_disk(E, disk);

    @@
    struct gendisk *disk;
    expression E1, E2;
    @@

    - disk->driverfs_dev = E1;
    ...
    E2 = disk;
    ...
    - add_disk(E2);
    + device_add_disk(E1, E2);

...plus some manual fixups for a few missed conversions.

Cc: Jens Axboe <axboe@fb.com>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
25 files changed:
arch/powerpc/sysdev/axonram.c
drivers/block/cciss.c
drivers/block/floppy.c
drivers/block/mtip32xx/mtip32xx.c
drivers/block/ps3disk.c
drivers/block/ps3vram.c
drivers/block/rsxx/dev.c
drivers/block/skd_main.c
drivers/block/sunvdc.c
drivers/block/virtio_blk.c
drivers/block/xen-blkfront.c
drivers/ide/ide-cd.c
drivers/ide/ide-gd.c
drivers/memstick/core/ms_block.c
drivers/memstick/core/mspro_block.c
drivers/mtd/mtd_blkdevs.c
drivers/nvdimm/blk.c
drivers/nvdimm/btt.c
drivers/nvdimm/pmem.c
drivers/nvme/host/core.c
drivers/s390/block/dasd_genhd.c
drivers/s390/block/dcssblk.c
drivers/s390/block/scm_blk.c
drivers/scsi/sd.c
drivers/scsi/sr.c