diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-cd.c | 8 | ||||
-rw-r--r-- | drivers/ide/ide-disk_proc.c | 8 | ||||
-rw-r--r-- | drivers/ide/ide-floppy_proc.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-gd.c | 6 | ||||
-rw-r--r-- | drivers/ide/ide-probe.c | 4 | ||||
-rw-r--r-- | drivers/ide/ide-proc.c | 22 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 8 |
7 files changed, 26 insertions, 32 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 8126824..0b510ba 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1408,7 +1408,7 @@ static int idecd_capacity_proc_show(struct seq_file *m, void *v) static int idecd_capacity_proc_open(struct inode *inode, struct file *file) { - return single_open(file, idecd_capacity_proc_show, PDE(inode)->data); + return single_open(file, idecd_capacity_proc_show, PDE_DATA(inode)); } static const struct file_operations idecd_capacity_proc_fops = { @@ -1606,7 +1606,7 @@ out: return rc; } -static int idecd_release(struct gendisk *disk, fmode_t mode) +static void idecd_release(struct gendisk *disk, fmode_t mode) { struct cdrom_info *info = ide_drv_g(disk, cdrom_info); @@ -1615,8 +1615,6 @@ static int idecd_release(struct gendisk *disk, fmode_t mode) ide_cd_put(info); mutex_unlock(&ide_cd_mutex); - - return 0; } static int idecd_set_spindown(struct cdrom_device_info *cdi, unsigned long arg) @@ -1758,7 +1756,7 @@ static int ide_cd_probe(ide_drive_t *drive) info->dev.parent = &drive->gendev; info->dev.release = ide_cd_release; - dev_set_name(&info->dev, dev_name(&drive->gendev)); + dev_set_name(&info->dev, "%s", dev_name(&drive->gendev)); if (device_register(&info->dev)) goto out_free_disk; diff --git a/drivers/ide/ide-disk_proc.c b/drivers/ide/ide-disk_proc.c index 8b570a1..0d1fae6 100644 --- a/drivers/ide/ide-disk_proc.c +++ b/drivers/ide/ide-disk_proc.c @@ -53,7 +53,7 @@ static int idedisk_cache_proc_show(struct seq_file *m, void *v) static int idedisk_cache_proc_open(struct inode *inode, struct file *file) { - return single_open(file, idedisk_cache_proc_show, PDE(inode)->data); + return single_open(file, idedisk_cache_proc_show, PDE_DATA(inode)); } static const struct file_operations idedisk_cache_proc_fops = { @@ -74,7 +74,7 @@ static int idedisk_capacity_proc_show(struct seq_file *m, void *v) static int idedisk_capacity_proc_open(struct inode *inode, struct file *file) { - return single_open(file, idedisk_capacity_proc_show, PDE(inode)->data); + return single_open(file, idedisk_capacity_proc_show, PDE_DATA(inode)); } static const struct file_operations idedisk_capacity_proc_fops = { @@ -115,7 +115,7 @@ static int idedisk_sv_proc_show(struct seq_file *m, void *v) static int idedisk_sv_proc_open(struct inode *inode, struct file *file) { - return single_open(file, idedisk_sv_proc_show, PDE(inode)->data); + return single_open(file, idedisk_sv_proc_show, PDE_DATA(inode)); } static const struct file_operations idedisk_sv_proc_fops = { @@ -133,7 +133,7 @@ static int idedisk_st_proc_show(struct seq_file *m, void *v) static int idedisk_st_proc_open(struct inode *inode, struct file *file) { - return single_open(file, idedisk_st_proc_show, PDE(inode)->data); + return single_open(file, idedisk_st_proc_show, PDE_DATA(inode)); } static const struct file_operations idedisk_st_proc_fops = { diff --git a/drivers/ide/ide-floppy_proc.c b/drivers/ide/ide-floppy_proc.c index 1600720..e7a25ea 100644 --- a/drivers/ide/ide-floppy_proc.c +++ b/drivers/ide/ide-floppy_proc.c @@ -15,7 +15,7 @@ static int idefloppy_capacity_proc_show(struct seq_file *m, void *v) static int idefloppy_capacity_proc_open(struct inode *inode, struct file *file) { - return single_open(file, idefloppy_capacity_proc_show, PDE(inode)->data); + return single_open(file, idefloppy_capacity_proc_show, PDE_DATA(inode)); } static const struct file_operations idefloppy_capacity_proc_fops = { diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c index 70ea876..838996a 100644 --- a/drivers/ide/ide-gd.c +++ b/drivers/ide/ide-gd.c @@ -250,7 +250,7 @@ static int ide_gd_unlocked_open(struct block_device *bdev, fmode_t mode) } -static int ide_gd_release(struct gendisk *disk, fmode_t mode) +static void ide_gd_release(struct gendisk *disk, fmode_t mode) { struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj); ide_drive_t *drive = idkp->drive; @@ -270,8 +270,6 @@ static int ide_gd_release(struct gendisk *disk, fmode_t mode) ide_disk_put(idkp); mutex_unlock(&ide_gd_mutex); - - return 0; } static int ide_gd_getgeo(struct block_device *bdev, struct hd_geometry *geo) @@ -394,7 +392,7 @@ static int ide_gd_probe(ide_drive_t *drive) idkp->dev.parent = &drive->gendev; idkp->dev.release = ide_disk_release; - dev_set_name(&idkp->dev, dev_name(&drive->gendev)); + dev_set_name(&idkp->dev, "%s", dev_name(&drive->gendev)); if (device_register(&idkp->dev)) goto out_free_disk; diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 068cef0..2a744a9 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -545,7 +545,7 @@ static int ide_register_port(ide_hwif_t *hwif) int ret; /* register with global device tree */ - dev_set_name(&hwif->gendev, hwif->name); + dev_set_name(&hwif->gendev, "%s", hwif->name); dev_set_drvdata(&hwif->gendev, hwif); if (hwif->gendev.parent == NULL) hwif->gendev.parent = hwif->dev; @@ -559,7 +559,7 @@ static int ide_register_port(ide_hwif_t *hwif) } hwif->portdev = device_create(ide_port_class, &hwif->gendev, - MKDEV(0, 0), hwif, hwif->name); + MKDEV(0, 0), hwif, "%s", hwif->name); if (IS_ERR(hwif->portdev)) { ret = PTR_ERR(hwif->portdev); device_unregister(&hwif->gendev); diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index 2abcc47..97c0700 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c @@ -58,7 +58,7 @@ static int ide_imodel_proc_show(struct seq_file *m, void *v) static int ide_imodel_proc_open(struct inode *inode, struct file *file) { - return single_open(file, ide_imodel_proc_show, PDE(inode)->data); + return single_open(file, ide_imodel_proc_show, PDE_DATA(inode)); } static const struct file_operations ide_imodel_proc_fops = { @@ -82,7 +82,7 @@ static int ide_mate_proc_show(struct seq_file *m, void *v) static int ide_mate_proc_open(struct inode *inode, struct file *file) { - return single_open(file, ide_mate_proc_show, PDE(inode)->data); + return single_open(file, ide_mate_proc_show, PDE_DATA(inode)); } static const struct file_operations ide_mate_proc_fops = { @@ -103,7 +103,7 @@ static int ide_channel_proc_show(struct seq_file *m, void *v) static int ide_channel_proc_open(struct inode *inode, struct file *file) { - return single_open(file, ide_channel_proc_show, PDE(inode)->data); + return single_open(file, ide_channel_proc_show, PDE_DATA(inode)); } static const struct file_operations ide_channel_proc_fops = { @@ -143,7 +143,7 @@ static int ide_identify_proc_show(struct seq_file *m, void *v) static int ide_identify_proc_open(struct inode *inode, struct file *file) { - return single_open(file, ide_identify_proc_show, PDE(inode)->data); + return single_open(file, ide_identify_proc_show, PDE_DATA(inode)); } static const struct file_operations ide_identify_proc_fops = { @@ -325,7 +325,7 @@ static int ide_settings_proc_show(struct seq_file *m, void *v) static int ide_settings_proc_open(struct inode *inode, struct file *file) { - return single_open(file, ide_settings_proc_show, PDE(inode)->data); + return single_open(file, ide_settings_proc_show, PDE_DATA(inode)); } #define MAX_LEN 30 @@ -333,7 +333,7 @@ static int ide_settings_proc_open(struct inode *inode, struct file *file) static ssize_t ide_settings_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos) { - ide_drive_t *drive = (ide_drive_t *) PDE(file_inode(file))->data; + ide_drive_t *drive = PDE_DATA(file_inode(file)); char name[MAX_LEN + 1]; int for_real = 0, mul_factor, div_factor; unsigned long n; @@ -474,7 +474,7 @@ static int ide_geometry_proc_show(struct seq_file *m, void *v) static int ide_geometry_proc_open(struct inode *inode, struct file *file) { - return single_open(file, ide_geometry_proc_show, PDE(inode)->data); + return single_open(file, ide_geometry_proc_show, PDE_DATA(inode)); } const struct file_operations ide_geometry_proc_fops = { @@ -497,7 +497,7 @@ static int ide_dmodel_proc_show(struct seq_file *seq, void *v) static int ide_dmodel_proc_open(struct inode *inode, struct file *file) { - return single_open(file, ide_dmodel_proc_show, PDE(inode)->data); + return single_open(file, ide_dmodel_proc_show, PDE_DATA(inode)); } static const struct file_operations ide_dmodel_proc_fops = { @@ -525,7 +525,7 @@ static int ide_driver_proc_show(struct seq_file *m, void *v) static int ide_driver_proc_open(struct inode *inode, struct file *file) { - return single_open(file, ide_driver_proc_show, PDE(inode)->data); + return single_open(file, ide_driver_proc_show, PDE_DATA(inode)); } static int ide_replace_subdriver(ide_drive_t *drive, const char *driver) @@ -558,7 +558,7 @@ static int ide_replace_subdriver(ide_drive_t *drive, const char *driver) static ssize_t ide_driver_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos) { - ide_drive_t *drive = (ide_drive_t *) PDE(file_inode(file))->data; + ide_drive_t *drive = PDE_DATA(file_inode(file)); char name[32]; if (!capable(CAP_SYS_ADMIN)) @@ -601,7 +601,7 @@ static int ide_media_proc_show(struct seq_file *m, void *v) static int ide_media_proc_open(struct inode *inode, struct file *file) { - return single_open(file, ide_media_proc_show, PDE(inode)->data); + return single_open(file, ide_media_proc_show, PDE_DATA(inode)); } static const struct file_operations ide_media_proc_fops = { diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index ce8237d..1793aea 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -1847,7 +1847,7 @@ static int idetape_name_proc_show(struct seq_file *m, void *v) static int idetape_name_proc_open(struct inode *inode, struct file *file) { - return single_open(file, idetape_name_proc_show, PDE(inode)->data); + return single_open(file, idetape_name_proc_show, PDE_DATA(inode)); } static const struct file_operations idetape_name_proc_fops = { @@ -1918,15 +1918,13 @@ static int idetape_open(struct block_device *bdev, fmode_t mode) return 0; } -static int idetape_release(struct gendisk *disk, fmode_t mode) +static void idetape_release(struct gendisk *disk, fmode_t mode) { struct ide_tape_obj *tape = ide_drv_g(disk, ide_tape_obj); mutex_lock(&ide_tape_mutex); ide_tape_put(tape); mutex_unlock(&ide_tape_mutex); - - return 0; } static int idetape_ioctl(struct block_device *bdev, fmode_t mode, @@ -1987,7 +1985,7 @@ static int ide_tape_probe(ide_drive_t *drive) tape->dev.parent = &drive->gendev; tape->dev.release = ide_tape_release; - dev_set_name(&tape->dev, dev_name(&drive->gendev)); + dev_set_name(&tape->dev, "%s", dev_name(&drive->gendev)); if (device_register(&tape->dev)) goto out_free_disk; |