]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide: remove ide_driver_t typedef
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 6 Jan 2009 16:20:53 +0000 (17:20 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 6 Jan 2009 16:20:53 +0000 (17:20 +0100)
While at it:
- s/struct ide_driver_s/struct ide_driver/
- use to_ide_driver() macro in ide-proc.c

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-cd.c
drivers/ide/ide-cd.h
drivers/ide/ide-gd.c
drivers/ide/ide-gd.h
drivers/ide/ide-io.c
drivers/ide/ide-pm.c
drivers/ide/ide-proc.c
drivers/ide/ide-tape.c
drivers/ide/ide-taskfile.c
drivers/ide/ide.c
include/linux/ide.h

index c35b64d495f5cfd1994c7167ba6880c46d113eba..bc982dfacc368cb95d74beb0d6db0d568e781c40 100644 (file)
@@ -1914,7 +1914,7 @@ static void ide_cd_release(struct kref *kref)
 
 static int ide_cd_probe(ide_drive_t *);
 
-static ide_driver_t ide_cdrom_driver = {
+static struct ide_driver ide_cdrom_driver = {
        .gen_driver = {
                .owner          = THIS_MODULE,
                .name           = "ide-cdrom",
index d5ae036af00c8ac7df5a5da9b4d85e6d9e8beea5..ac40d6cb90a240725ae40d661e428e27ebc36aef 100644 (file)
@@ -77,10 +77,10 @@ struct atapi_toc {
 
 /* Extra per-device info for cdrom drives. */
 struct cdrom_info {
-       ide_drive_t     *drive;
-       ide_driver_t    *driver;
-       struct gendisk  *disk;
-       struct kref     kref;
+       ide_drive_t             *drive;
+       struct ide_driver       *driver;
+       struct gendisk          *disk;
+       struct kref             kref;
 
        /* Buffer for table of contents.  NULL if we haven't allocated
           a TOC buffer for this device yet. */
index b8078b3231f7f9de114affcd3b4c5ced5e436728..cae82b3c432a80a2d1d5861afd774ba620916171 100644 (file)
@@ -149,7 +149,7 @@ static int ide_gd_end_request(ide_drive_t *drive, int uptodate, int nrsecs)
        return drive->disk_ops->end_request(drive, uptodate, nrsecs);
 }
 
-static ide_driver_t ide_gd_driver = {
+static struct ide_driver ide_gd_driver = {
        .gen_driver = {
                .owner          = THIS_MODULE,
                .name           = "ide-gd",
index 7d3d101713e0682a21e5b69ef7bd2dcac86d833c..a86779f0756b7c117ece8a93c3acaa649c6dd9d9 100644 (file)
 #endif
 
 struct ide_disk_obj {
-       ide_drive_t     *drive;
-       ide_driver_t    *driver;
-       struct gendisk  *disk;
-       struct kref     kref;
-       unsigned int    openers;        /* protected by BKL for now */
+       ide_drive_t             *drive;
+       struct ide_driver       *driver;
+       struct gendisk          *disk;
+       struct kref             kref;
+       unsigned int            openers;        /* protected by BKL for now */
 
        /* Last failed packet command */
        struct ide_atapi_pc *failed_pc;
index 0e2b95ec08a54c37606f5d6643cb9385e055c80e..e788b3622f2e248803cbfd7ffad745ae6cc74238 100644 (file)
@@ -199,9 +199,9 @@ EXPORT_SYMBOL(ide_end_drive_cmd);
 static void ide_kill_rq(ide_drive_t *drive, struct request *rq)
 {
        if (rq->rq_disk) {
-               ide_driver_t *drv;
+               struct ide_driver *drv;
 
-               drv = *(ide_driver_t **)rq->rq_disk->private_data;
+               drv = *(struct ide_driver **)rq->rq_disk->private_data;
                drv->end_request(drive, 0, 0);
        } else
                ide_end_request(drive, 0, 0);
@@ -333,9 +333,9 @@ ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, u8 stat)
        }
 
        if (rq->rq_disk) {
-               ide_driver_t *drv;
+               struct ide_driver *drv;
 
-               drv = *(ide_driver_t **)rq->rq_disk->private_data;
+               drv = *(struct ide_driver **)rq->rq_disk->private_data;
                return drv->error(drive, rq, stat, err);
        } else
                return __ide_error(drive, rq, stat, err);
@@ -606,7 +606,7 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
                return startstop;
        }
        if (!drive->special.all) {
-               ide_driver_t *drv;
+               struct ide_driver *drv;
 
                /*
                 * 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)
                         */
                        return ide_special_rq(drive, rq);
 
-               drv = *(ide_driver_t **)rq->rq_disk->private_data;
+               drv = *(struct ide_driver **)rq->rq_disk->private_data;
 
                return drv->do_request(drive, rq, rq->sector);
        }
index 0c206c68bbb16578520d4df2e6c53bc9baf3fbcd..4b3bf6a06b70ef1be71134295af5ce749072750d 100644 (file)
@@ -67,7 +67,7 @@ int generic_ide_resume(struct device *dev)
        blk_put_request(rq);
 
        if (err == 0 && dev->driver) {
-               ide_driver_t *drv = to_ide_driver(dev->driver);
+               struct ide_driver *drv = to_ide_driver(dev->driver);
 
                if (drv->resume)
                        drv->resume(drive);
index a14e2938e4f36c0b6bb77d9c269a0a4b6e7d8bc7..d985a9ec6befd87c8c0b247c5109886dedfa941c 100644 (file)
@@ -439,13 +439,13 @@ static int proc_ide_read_dmodel
 static int proc_ide_read_driver
        (char *page, char **start, off_t off, int count, int *eof, void *data)
 {
-       ide_drive_t     *drive = (ide_drive_t *) data;
-       struct device   *dev = &drive->gendev;
-       ide_driver_t    *ide_drv;
-       int             len;
+       ide_drive_t             *drive = (ide_drive_t *)data;
+       struct device           *dev = &drive->gendev;
+       struct ide_driver       *ide_drv;
+       int                     len;
 
        if (dev->driver) {
-               ide_drv = container_of(dev->driver, ide_driver_t, gen_driver);
+               ide_drv = to_ide_driver(dev->driver);
                len = sprintf(page, "%s version %s\n",
                                dev->driver->name, ide_drv->version);
        } else
@@ -555,7 +555,7 @@ static void ide_remove_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t
        }
 }
 
-void ide_proc_register_driver(ide_drive_t *drive, ide_driver_t *driver)
+void ide_proc_register_driver(ide_drive_t *drive, struct ide_driver *driver)
 {
        mutex_lock(&ide_setting_mtx);
        drive->settings = driver->proc_devsets(drive);
@@ -577,7 +577,7 @@ EXPORT_SYMBOL(ide_proc_register_driver);
  *     Takes ide_setting_mtx.
  */
 
-void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver)
+void ide_proc_unregister_driver(ide_drive_t *drive, struct ide_driver *driver)
 {
        ide_remove_proc_entries(drive->proc, driver->proc_entries(drive));
 
@@ -653,7 +653,7 @@ void ide_proc_unregister_port(ide_hwif_t *hwif)
 
 static int proc_print_driver(struct device_driver *drv, void *data)
 {
-       ide_driver_t *ide_drv = container_of(drv, ide_driver_t, gen_driver);
+       struct ide_driver *ide_drv = to_ide_driver(drv);
        struct seq_file *s = data;
 
        seq_printf(s, "%s version %s\n", drv->name, ide_drv->version);
index e39f2f46d982a536219f32a3c6f1e905ebf2f799..fd865039bfdba7c523d3f123d8a51c69cbf9a389 100644 (file)
@@ -166,10 +166,10 @@ struct idetape_bh {
  * to an interrupt or a timer event is stored in the struct defined below.
  */
 typedef struct ide_tape_obj {
-       ide_drive_t     *drive;
-       ide_driver_t    *driver;
-       struct gendisk  *disk;
-       struct kref     kref;
+       ide_drive_t             *drive;
+       struct ide_driver       *driver;
+       struct gendisk          *disk;
+       struct kref             kref;
 
        /*
         *      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)
 
 static int ide_tape_probe(ide_drive_t *);
 
-static ide_driver_t idetape_driver = {
+static struct ide_driver idetape_driver = {
        .gen_driver = {
                .owner          = THIS_MODULE,
                .name           = "ide-tape",
index 55d451ce9b4f8fc0fc66fd75064ffef80e5b1c53..16138bce84a794c88c027029c8a321ba63191067 100644 (file)
@@ -309,9 +309,9 @@ static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq,
                }
 
                if (sectors > 0) {
-                       ide_driver_t *drv;
+                       struct ide_driver *drv;
 
-                       drv = *(ide_driver_t **)rq->rq_disk->private_data;
+                       drv = *(struct ide_driver **)rq->rq_disk->private_data;
                        drv->end_request(drive, 1, sectors);
                }
        }
@@ -328,9 +328,9 @@ void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat)
        }
 
        if (rq->rq_disk) {
-               ide_driver_t *drv;
+               struct ide_driver *drv;
 
-               drv = *(ide_driver_t **)rq->rq_disk->private_data;;
+               drv = *(struct ide_driver **)rq->rq_disk->private_data;;
                drv->end_request(drive, 1, rq->nr_sectors);
        } else
                ide_end_request(drive, 1, rq->nr_sectors);
index c1bb0f6784a9cf865be2e62253bf804724abe937..6971c285a212b5a097d7244cae6e9ff17fa2b23d 100644 (file)
@@ -281,7 +281,7 @@ static int ide_uevent(struct device *dev, struct kobj_uevent_env *env)
 static int generic_ide_probe(struct device *dev)
 {
        ide_drive_t *drive = to_ide_device(dev);
-       ide_driver_t *drv = to_ide_driver(dev->driver);
+       struct ide_driver *drv = to_ide_driver(dev->driver);
 
        return drv->probe ? drv->probe(drive) : -ENODEV;
 }
@@ -289,7 +289,7 @@ static int generic_ide_probe(struct device *dev)
 static int generic_ide_remove(struct device *dev)
 {
        ide_drive_t *drive = to_ide_device(dev);
-       ide_driver_t *drv = to_ide_driver(dev->driver);
+       struct ide_driver *drv = to_ide_driver(dev->driver);
 
        if (drv->remove)
                drv->remove(drive);
@@ -300,7 +300,7 @@ static int generic_ide_remove(struct device *dev)
 static void generic_ide_shutdown(struct device *dev)
 {
        ide_drive_t *drive = to_ide_device(dev);
-       ide_driver_t *drv = to_ide_driver(dev->driver);
+       struct ide_driver *drv = to_ide_driver(dev->driver);
 
        if (dev->driver && drv->shutdown)
                drv->shutdown(drive);
index 545a67f1f6b5df5dc0e5b29a4664d5683c76ddc1..fcbcfa2cbe75c68f8900f8dbb8512281dd9a54f4 100644 (file)
@@ -437,7 +437,7 @@ struct ide_atapi_pc {
 };
 
 struct ide_devset;
-struct ide_driver_s;
+struct ide_driver;
 
 #ifdef CONFIG_BLK_DEV_IDEACPI
 struct ide_acpi_drive_link;
@@ -884,8 +884,6 @@ typedef int (ide_expiry_t)(ide_drive_t *);
 /* used by ide-cd, ide-floppy, etc. */
 typedef void (xfer_func_t)(ide_drive_t *, struct request *rq, void *, unsigned);
 
-typedef struct ide_driver_s ide_driver_t;
-
 extern struct mutex ide_setting_mtx;
 
 /*
@@ -1011,8 +1009,8 @@ void ide_proc_register_port(ide_hwif_t *);
 void ide_proc_port_register_devices(ide_hwif_t *);
 void ide_proc_unregister_device(ide_drive_t *);
 void ide_proc_unregister_port(ide_hwif_t *);
-void ide_proc_register_driver(ide_drive_t *, ide_driver_t *);
-void ide_proc_unregister_driver(ide_drive_t *, ide_driver_t *);
+void ide_proc_register_driver(ide_drive_t *, struct ide_driver *);
+void ide_proc_unregister_driver(ide_drive_t *, struct ide_driver *);
 
 read_proc_t proc_ide_read_capacity;
 read_proc_t proc_ide_read_geometry;
@@ -1039,8 +1037,10 @@ static inline void ide_proc_register_port(ide_hwif_t *hwif) { ; }
 static inline void ide_proc_port_register_devices(ide_hwif_t *hwif) { ; }
 static inline void ide_proc_unregister_device(ide_drive_t *drive) { ; }
 static inline void ide_proc_unregister_port(ide_hwif_t *hwif) { ; }
-static inline void ide_proc_register_driver(ide_drive_t *drive, ide_driver_t *driver) { ; }
-static inline void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver) { ; }
+static inline void ide_proc_register_driver(ide_drive_t *drive,
+                                           struct ide_driver *driver) { ; }
+static inline void ide_proc_unregister_driver(ide_drive_t *drive,
+                                             struct ide_driver *driver) { ; }
 #define PROC_IDE_READ_RETURN(page,start,off,count,eof,len) return 0;
 #endif
 
@@ -1109,7 +1109,7 @@ void ide_check_pm_state(ide_drive_t *, struct request *);
  * The gendriver.owner field should be set to the module owner of this driver.
  * The gendriver.name field should be set to the name of this driver
  */
-struct ide_driver_s {
+struct ide_driver {
        const char                      *version;
        ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t);
        int             (*end_request)(ide_drive_t *, int, int);
@@ -1125,7 +1125,7 @@ struct ide_driver_s {
 #endif
 };
 
-#define to_ide_driver(drv) container_of(drv, ide_driver_t, gen_driver)
+#define to_ide_driver(drv) container_of(drv, struct ide_driver, gen_driver)
 
 int ide_device_get(ide_drive_t *);
 void ide_device_put(ide_drive_t *);