aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-cd.c2
-rw-r--r--drivers/ide/ide-cd.h8
-rw-r--r--drivers/ide/ide-gd.c2
-rw-r--r--drivers/ide/ide-gd.h10
-rw-r--r--drivers/ide/ide-io.c12
-rw-r--r--drivers/ide/ide-pm.c2
-rw-r--r--drivers/ide/ide-proc.c16
-rw-r--r--drivers/ide/ide-tape.c10
-rw-r--r--drivers/ide/ide-taskfile.c8
-rw-r--r--drivers/ide/ide.c6
-rw-r--r--include/linux/ide.h18
11 files changed, 47 insertions, 47 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index c35b64d495f5..bc982dfacc36 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1914,7 +1914,7 @@ static void ide_cd_release(struct kref *kref)
1914 1914
1915static int ide_cd_probe(ide_drive_t *); 1915static int ide_cd_probe(ide_drive_t *);
1916 1916
1917static ide_driver_t ide_cdrom_driver = { 1917static struct ide_driver ide_cdrom_driver = {
1918 .gen_driver = { 1918 .gen_driver = {
1919 .owner = THIS_MODULE, 1919 .owner = THIS_MODULE,
1920 .name = "ide-cdrom", 1920 .name = "ide-cdrom",
diff --git a/drivers/ide/ide-cd.h b/drivers/ide/ide-cd.h
index d5ae036af00c..ac40d6cb90a2 100644
--- a/drivers/ide/ide-cd.h
+++ b/drivers/ide/ide-cd.h
@@ -77,10 +77,10 @@ struct atapi_toc {
77 77
78/* Extra per-device info for cdrom drives. */ 78/* Extra per-device info for cdrom drives. */
79struct cdrom_info { 79struct cdrom_info {
80 ide_drive_t *drive; 80 ide_drive_t *drive;
81 ide_driver_t *driver; 81 struct ide_driver *driver;
82 struct gendisk *disk; 82 struct gendisk *disk;
83 struct kref kref; 83 struct kref kref;
84 84
85 /* Buffer for table of contents. NULL if we haven't allocated 85 /* Buffer for table of contents. NULL if we haven't allocated
86 a TOC buffer for this device yet. */ 86 a TOC buffer for this device yet. */
diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c
index b8078b3231f7..cae82b3c432a 100644
--- a/drivers/ide/ide-gd.c
+++ b/drivers/ide/ide-gd.c
@@ -149,7 +149,7 @@ static int ide_gd_end_request(ide_drive_t *drive, int uptodate, int nrsecs)
149 return drive->disk_ops->end_request(drive, uptodate, nrsecs); 149 return drive->disk_ops->end_request(drive, uptodate, nrsecs);
150} 150}
151 151
152static ide_driver_t ide_gd_driver = { 152static struct ide_driver ide_gd_driver = {
153 .gen_driver = { 153 .gen_driver = {
154 .owner = THIS_MODULE, 154 .owner = THIS_MODULE,
155 .name = "ide-gd", 155 .name = "ide-gd",
diff --git a/drivers/ide/ide-gd.h b/drivers/ide/ide-gd.h
index 7d3d101713e0..a86779f0756b 100644
--- a/drivers/ide/ide-gd.h
+++ b/drivers/ide/ide-gd.h
@@ -14,11 +14,11 @@
14#endif 14#endif
15 15
16struct ide_disk_obj { 16struct ide_disk_obj {
17 ide_drive_t *drive; 17 ide_drive_t *drive;
18 ide_driver_t *driver; 18 struct ide_driver *driver;
19 struct gendisk *disk; 19 struct gendisk *disk;
20 struct kref kref; 20 struct kref kref;
21 unsigned int openers; /* protected by BKL for now */ 21 unsigned int openers; /* protected by BKL for now */
22 22
23 /* Last failed packet command */ 23 /* Last failed packet command */
24 struct ide_atapi_pc *failed_pc; 24 struct ide_atapi_pc *failed_pc;
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 0e2b95ec08a5..e788b3622f2e 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -199,9 +199,9 @@ EXPORT_SYMBOL(ide_end_drive_cmd);
199static void ide_kill_rq(ide_drive_t *drive, struct request *rq) 199static void ide_kill_rq(ide_drive_t *drive, struct request *rq)
200{ 200{
201 if (rq->rq_disk) { 201 if (rq->rq_disk) {
202 ide_driver_t *drv; 202 struct ide_driver *drv;
203 203
204 drv = *(ide_driver_t **)rq->rq_disk->private_data; 204 drv = *(struct ide_driver **)rq->rq_disk->private_data;
205 drv->end_request(drive, 0, 0); 205 drv->end_request(drive, 0, 0);
206 } else 206 } else
207 ide_end_request(drive, 0, 0); 207 ide_end_request(drive, 0, 0);
@@ -333,9 +333,9 @@ ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, u8 stat)
333 } 333 }
334 334
335 if (rq->rq_disk) { 335 if (rq->rq_disk) {
336 ide_driver_t *drv; 336 struct ide_driver *drv;
337 337
338 drv = *(ide_driver_t **)rq->rq_disk->private_data; 338 drv = *(struct ide_driver **)rq->rq_disk->private_data;
339 return drv->error(drive, rq, stat, err); 339 return drv->error(drive, rq, stat, err);
340 } else 340 } else
341 return __ide_error(drive, rq, stat, err); 341 return __ide_error(drive, rq, stat, err);
@@ -606,7 +606,7 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
606 return startstop; 606 return startstop;
607 } 607 }
608 if (!drive->special.all) { 608 if (!drive->special.all) {
609 ide_driver_t *drv; 609 struct ide_driver *drv;
610 610
611 /* 611 /*
612 * We reset the drive so we need to issue a SETFEATURES. 612 * We reset the drive so we need to issue a SETFEATURES.
@@ -639,7 +639,7 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
639 */ 639 */
640 return ide_special_rq(drive, rq); 640 return ide_special_rq(drive, rq);
641 641
642 drv = *(ide_driver_t **)rq->rq_disk->private_data; 642 drv = *(struct ide_driver **)rq->rq_disk->private_data;
643 643
644 return drv->do_request(drive, rq, rq->sector); 644 return drv->do_request(drive, rq, rq->sector);
645 } 645 }
diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c
index 0c206c68bbb1..4b3bf6a06b70 100644
--- a/drivers/ide/ide-pm.c
+++ b/drivers/ide/ide-pm.c
@@ -67,7 +67,7 @@ int generic_ide_resume(struct device *dev)
67 blk_put_request(rq); 67 blk_put_request(rq);
68 68
69 if (err == 0 && dev->driver) { 69 if (err == 0 && dev->driver) {
70 ide_driver_t *drv = to_ide_driver(dev->driver); 70 struct ide_driver *drv = to_ide_driver(dev->driver);
71 71
72 if (drv->resume) 72 if (drv->resume)
73 drv->resume(drive); 73 drv->resume(drive);
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index a14e2938e4f3..d985a9ec6bef 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -439,13 +439,13 @@ static int proc_ide_read_dmodel
439static int proc_ide_read_driver 439static int proc_ide_read_driver
440 (char *page, char **start, off_t off, int count, int *eof, void *data) 440 (char *page, char **start, off_t off, int count, int *eof, void *data)
441{ 441{
442 ide_drive_t *drive = (ide_drive_t *) data; 442 ide_drive_t *drive = (ide_drive_t *)data;
443 struct device *dev = &drive->gendev; 443 struct device *dev = &drive->gendev;
444 ide_driver_t *ide_drv; 444 struct ide_driver *ide_drv;
445 int len; 445 int len;
446 446
447 if (dev->driver) { 447 if (dev->driver) {
448 ide_drv = container_of(dev->driver, ide_driver_t, gen_driver); 448 ide_drv = to_ide_driver(dev->driver);
449 len = sprintf(page, "%s version %s\n", 449 len = sprintf(page, "%s version %s\n",
450 dev->driver->name, ide_drv->version); 450 dev->driver->name, ide_drv->version);
451 } else 451 } else
@@ -555,7 +555,7 @@ static void ide_remove_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t
555 } 555 }
556} 556}
557 557
558void ide_proc_register_driver(ide_drive_t *drive, ide_driver_t *driver) 558void ide_proc_register_driver(ide_drive_t *drive, struct ide_driver *driver)
559{ 559{
560 mutex_lock(&ide_setting_mtx); 560 mutex_lock(&ide_setting_mtx);
561 drive->settings = driver->proc_devsets(drive); 561 drive->settings = driver->proc_devsets(drive);
@@ -577,7 +577,7 @@ EXPORT_SYMBOL(ide_proc_register_driver);
577 * Takes ide_setting_mtx. 577 * Takes ide_setting_mtx.
578 */ 578 */
579 579
580void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver) 580void ide_proc_unregister_driver(ide_drive_t *drive, struct ide_driver *driver)
581{ 581{
582 ide_remove_proc_entries(drive->proc, driver->proc_entries(drive)); 582 ide_remove_proc_entries(drive->proc, driver->proc_entries(drive));
583 583
@@ -653,7 +653,7 @@ void ide_proc_unregister_port(ide_hwif_t *hwif)
653 653
654static int proc_print_driver(struct device_driver *drv, void *data) 654static int proc_print_driver(struct device_driver *drv, void *data)
655{ 655{
656 ide_driver_t *ide_drv = container_of(drv, ide_driver_t, gen_driver); 656 struct ide_driver *ide_drv = to_ide_driver(drv);
657 struct seq_file *s = data; 657 struct seq_file *s = data;
658 658
659 seq_printf(s, "%s version %s\n", drv->name, ide_drv->version); 659 seq_printf(s, "%s version %s\n", drv->name, ide_drv->version);
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index e39f2f46d982..fd865039bfdb 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -166,10 +166,10 @@ struct idetape_bh {
166 * to an interrupt or a timer event is stored in the struct defined below. 166 * to an interrupt or a timer event is stored in the struct defined below.
167 */ 167 */
168typedef struct ide_tape_obj { 168typedef struct ide_tape_obj {
169 ide_drive_t *drive; 169 ide_drive_t *drive;
170 ide_driver_t *driver; 170 struct ide_driver *driver;
171 struct gendisk *disk; 171 struct gendisk *disk;
172 struct kref kref; 172 struct kref kref;
173 173
174 /* 174 /*
175 * failed_pc points to the last failed packet command, or contains 175 * failed_pc points to the last failed packet command, or contains
@@ -2313,7 +2313,7 @@ static const struct ide_proc_devset *ide_tape_proc_devsets(ide_drive_t *drive)
2313 2313
2314static int ide_tape_probe(ide_drive_t *); 2314static int ide_tape_probe(ide_drive_t *);
2315 2315
2316static ide_driver_t idetape_driver = { 2316static struct ide_driver idetape_driver = {
2317 .gen_driver = { 2317 .gen_driver = {
2318 .owner = THIS_MODULE, 2318 .owner = THIS_MODULE,
2319 .name = "ide-tape", 2319 .name = "ide-tape",
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 55d451ce9b4f..16138bce84a7 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -309,9 +309,9 @@ static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq,
309 } 309 }
310 310
311 if (sectors > 0) { 311 if (sectors > 0) {
312 ide_driver_t *drv; 312 struct ide_driver *drv;
313 313
314 drv = *(ide_driver_t **)rq->rq_disk->private_data; 314 drv = *(struct ide_driver **)rq->rq_disk->private_data;
315 drv->end_request(drive, 1, sectors); 315 drv->end_request(drive, 1, sectors);
316 } 316 }
317 } 317 }
@@ -328,9 +328,9 @@ void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat)
328 } 328 }
329 329
330 if (rq->rq_disk) { 330 if (rq->rq_disk) {
331 ide_driver_t *drv; 331 struct ide_driver *drv;
332 332
333 drv = *(ide_driver_t **)rq->rq_disk->private_data;; 333 drv = *(struct ide_driver **)rq->rq_disk->private_data;;
334 drv->end_request(drive, 1, rq->nr_sectors); 334 drv->end_request(drive, 1, rq->nr_sectors);
335 } else 335 } else
336 ide_end_request(drive, 1, rq->nr_sectors); 336 ide_end_request(drive, 1, rq->nr_sectors);
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index c1bb0f6784a9..6971c285a212 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -281,7 +281,7 @@ static int ide_uevent(struct device *dev, struct kobj_uevent_env *env)
281static int generic_ide_probe(struct device *dev) 281static int generic_ide_probe(struct device *dev)
282{ 282{
283 ide_drive_t *drive = to_ide_device(dev); 283 ide_drive_t *drive = to_ide_device(dev);
284 ide_driver_t *drv = to_ide_driver(dev->driver); 284 struct ide_driver *drv = to_ide_driver(dev->driver);
285 285
286 return drv->probe ? drv->probe(drive) : -ENODEV; 286 return drv->probe ? drv->probe(drive) : -ENODEV;
287} 287}
@@ -289,7 +289,7 @@ static int generic_ide_probe(struct device *dev)
289static int generic_ide_remove(struct device *dev) 289static int generic_ide_remove(struct device *dev)
290{ 290{
291 ide_drive_t *drive = to_ide_device(dev); 291 ide_drive_t *drive = to_ide_device(dev);
292 ide_driver_t *drv = to_ide_driver(dev->driver); 292 struct ide_driver *drv = to_ide_driver(dev->driver);
293 293
294 if (drv->remove) 294 if (drv->remove)
295 drv->remove(drive); 295 drv->remove(drive);
@@ -300,7 +300,7 @@ static int generic_ide_remove(struct device *dev)
300static void generic_ide_shutdown(struct device *dev) 300static void generic_ide_shutdown(struct device *dev)
301{ 301{
302 ide_drive_t *drive = to_ide_device(dev); 302 ide_drive_t *drive = to_ide_device(dev);
303 ide_driver_t *drv = to_ide_driver(dev->driver); 303 struct ide_driver *drv = to_ide_driver(dev->driver);
304 304
305 if (dev->driver && drv->shutdown) 305 if (dev->driver && drv->shutdown)
306 drv->shutdown(drive); 306 drv->shutdown(drive);
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 545a67f1f6b5..fcbcfa2cbe75 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -437,7 +437,7 @@ struct ide_atapi_pc {
437}; 437};
438 438
439struct ide_devset; 439struct ide_devset;
440struct ide_driver_s; 440struct ide_driver;
441 441
442#ifdef CONFIG_BLK_DEV_IDEACPI 442#ifdef CONFIG_BLK_DEV_IDEACPI
443struct ide_acpi_drive_link; 443struct ide_acpi_drive_link;
@@ -884,8 +884,6 @@ typedef int (ide_expiry_t)(ide_drive_t *);
884/* used by ide-cd, ide-floppy, etc. */ 884/* used by ide-cd, ide-floppy, etc. */
885typedef void (xfer_func_t)(ide_drive_t *, struct request *rq, void *, unsigned); 885typedef void (xfer_func_t)(ide_drive_t *, struct request *rq, void *, unsigned);
886 886
887typedef struct ide_driver_s ide_driver_t;
888
889extern struct mutex ide_setting_mtx; 887extern struct mutex ide_setting_mtx;
890 888
891/* 889/*
@@ -1011,8 +1009,8 @@ void ide_proc_register_port(ide_hwif_t *);
1011void ide_proc_port_register_devices(ide_hwif_t *); 1009void ide_proc_port_register_devices(ide_hwif_t *);
1012void ide_proc_unregister_device(ide_drive_t *); 1010void ide_proc_unregister_device(ide_drive_t *);
1013void ide_proc_unregister_port(ide_hwif_t *); 1011void ide_proc_unregister_port(ide_hwif_t *);
1014void ide_proc_register_driver(ide_drive_t *, ide_driver_t *); 1012void ide_proc_register_driver(ide_drive_t *, struct ide_driver *);
1015void ide_proc_unregister_driver(ide_drive_t *, ide_driver_t *); 1013void ide_proc_unregister_driver(ide_drive_t *, struct ide_driver *);
1016 1014
1017read_proc_t proc_ide_read_capacity; 1015read_proc_t proc_ide_read_capacity;
1018read_proc_t proc_ide_read_geometry; 1016read_proc_t proc_ide_read_geometry;
@@ -1039,8 +1037,10 @@ static inline void ide_proc_register_port(ide_hwif_t *hwif) { ; }
1039static inline void ide_proc_port_register_devices(ide_hwif_t *hwif) { ; } 1037static inline void ide_proc_port_register_devices(ide_hwif_t *hwif) { ; }
1040static inline void ide_proc_unregister_device(ide_drive_t *drive) { ; } 1038static inline void ide_proc_unregister_device(ide_drive_t *drive) { ; }
1041static inline void ide_proc_unregister_port(ide_hwif_t *hwif) { ; } 1039static inline void ide_proc_unregister_port(ide_hwif_t *hwif) { ; }
1042static inline void ide_proc_register_driver(ide_drive_t *drive, ide_driver_t *driver) { ; } 1040static inline void ide_proc_register_driver(ide_drive_t *drive,
1043static inline void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver) { ; } 1041 struct ide_driver *driver) { ; }
1042static inline void ide_proc_unregister_driver(ide_drive_t *drive,
1043 struct ide_driver *driver) { ; }
1044#define PROC_IDE_READ_RETURN(page,start,off,count,eof,len) return 0; 1044#define PROC_IDE_READ_RETURN(page,start,off,count,eof,len) return 0;
1045#endif 1045#endif
1046 1046
@@ -1109,7 +1109,7 @@ void ide_check_pm_state(ide_drive_t *, struct request *);
1109 * The gendriver.owner field should be set to the module owner of this driver. 1109 * The gendriver.owner field should be set to the module owner of this driver.
1110 * The gendriver.name field should be set to the name of this driver 1110 * The gendriver.name field should be set to the name of this driver
1111 */ 1111 */
1112struct ide_driver_s { 1112struct ide_driver {
1113 const char *version; 1113 const char *version;
1114 ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t); 1114 ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t);
1115 int (*end_request)(ide_drive_t *, int, int); 1115 int (*end_request)(ide_drive_t *, int, int);
@@ -1125,7 +1125,7 @@ struct ide_driver_s {
1125#endif 1125#endif
1126}; 1126};
1127 1127
1128#define to_ide_driver(drv) container_of(drv, ide_driver_t, gen_driver) 1128#define to_ide_driver(drv) container_of(drv, struct ide_driver, gen_driver)
1129 1129
1130int ide_device_get(ide_drive_t *); 1130int ide_device_get(ide_drive_t *);
1131void ide_device_put(ide_drive_t *); 1131void ide_device_put(ide_drive_t *);