ide: do not access ide_drive_t 'drive_data' field directly
[deliverable/linux.git] / include / linux / ide.h
index 08c91e21cf4794c6c598bcad27ec87f56f3e9856..95c6e00a72e826e709258734554a8d70091247c5 100644 (file)
@@ -532,7 +532,7 @@ struct ide_drive_s {
 
        unsigned int    bios_cyl;       /* BIOS/fdisk/LILO number of cyls */
        unsigned int    cyl;            /* "real" number of cyls */
-       unsigned int    drive_data;     /* used by set_pio_mode/dev_select() */
+       void            *drive_data;    /* used by set_pio_mode/dev_select() */
        unsigned int    failures;       /* current failure count */
        unsigned int    max_failures;   /* maximum allowed failure count */
        u64             probed_capacity;/* initial/native media capacity */
@@ -1550,6 +1550,16 @@ static inline ide_drive_t *ide_get_pair_dev(ide_drive_t *drive)
        return (peer->dev_flags & IDE_DFLAG_PRESENT) ? peer : NULL;
 }
 
+static inline void *ide_get_drivedata(ide_drive_t *drive)
+{
+       return drive->drive_data;
+}
+
+static inline void ide_set_drivedata(ide_drive_t *drive, void *data)
+{
+       drive->drive_data = data;
+}
+
 #define ide_port_for_each_dev(i, dev, port) \
        for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++)
 
This page took 0.025434 seconds and 5 git commands to generate.