diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2008-02-06 04:38:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:10 -0500 |
commit | 5ceadd2a2a9cf2768a9baf808abf1ffeedcc4cc4 (patch) | |
tree | f4cccb9f3a99b3ebdbeb92a63f343835e86f685c /drivers/block | |
parent | 7129b126cc64f530d793bd56eb1709a06ec65a2d (diff) |
Atari floppy: Rename disk_type to atari_disk_type
Commit edfaa7c36574f1bf09c65ad602412db9da5f96bf
Driver core: convert block from raw kobjects to core devices
This moves the block devices to /sys/class/block. It will create a
flat list of all block devices, with the disks and partitions in one
directory. For compatibility /sys/block is created and contains symlinks
to the disks.
introduced a global disk_type variable in <linux/genhd.h>, causing the
following compile error on Atari:
drivers/block/ataflop.c:93: error: conflicting types for 'disk_type'
include/linux/genhd.h:21: error: previous declaration of 'disk_type' was here
Rename the local disk_type variable in drivers/block/ataflop.c to
atari_disk_type, to avoid the conflict.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/ataflop.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index 94268c75d04f..424995073c6b 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c | |||
@@ -90,7 +90,7 @@ static struct atari_disk_type { | |||
90 | unsigned blocks; /* total number of blocks */ | 90 | unsigned blocks; /* total number of blocks */ |
91 | unsigned fdc_speed; /* fdc_speed setting */ | 91 | unsigned fdc_speed; /* fdc_speed setting */ |
92 | unsigned stretch; /* track doubling ? */ | 92 | unsigned stretch; /* track doubling ? */ |
93 | } disk_type[] = { | 93 | } atari_disk_type[] = { |
94 | { "d360", 9, 720, 0, 0}, /* 0: 360kB diskette */ | 94 | { "d360", 9, 720, 0, 0}, /* 0: 360kB diskette */ |
95 | { "D360", 9, 720, 0, 1}, /* 1: 360kb in 720k or 1.2MB drive */ | 95 | { "D360", 9, 720, 0, 1}, /* 1: 360kb in 720k or 1.2MB drive */ |
96 | { "D720", 9,1440, 0, 0}, /* 2: 720kb in 720k or 1.2MB drive */ | 96 | { "D720", 9,1440, 0, 0}, /* 2: 720kb in 720k or 1.2MB drive */ |
@@ -658,7 +658,7 @@ static int do_format(int drive, int type, struct atari_format_descr *desc) | |||
658 | return -EINVAL; | 658 | return -EINVAL; |
659 | } | 659 | } |
660 | type = minor2disktype[type].index; | 660 | type = minor2disktype[type].index; |
661 | UDT = &disk_type[type]; | 661 | UDT = &atari_disk_type[type]; |
662 | } | 662 | } |
663 | 663 | ||
664 | if (!UDT || desc->track >= UDT->blocks/UDT->spt/2 || desc->head >= 2) { | 664 | if (!UDT || desc->track >= UDT->blocks/UDT->spt/2 || desc->head >= 2) { |
@@ -1064,7 +1064,7 @@ static void fd_rwsec_done1(int status) | |||
1064 | searched for a non-existent sector! */ | 1064 | searched for a non-existent sector! */ |
1065 | !(read_track && FDC_READ(FDCREG_SECTOR) > SUDT->spt)) { | 1065 | !(read_track && FDC_READ(FDCREG_SECTOR) > SUDT->spt)) { |
1066 | if (Probing) { | 1066 | if (Probing) { |
1067 | if (SUDT > disk_type) { | 1067 | if (SUDT > atari_disk_type) { |
1068 | if (SUDT[-1].blocks > ReqBlock) { | 1068 | if (SUDT[-1].blocks > ReqBlock) { |
1069 | /* try another disk type */ | 1069 | /* try another disk type */ |
1070 | SUDT--; | 1070 | SUDT--; |
@@ -1082,7 +1082,7 @@ static void fd_rwsec_done1(int status) | |||
1082 | } else { | 1082 | } else { |
1083 | /* record not found, but not probing. Maybe stretch wrong ? Restart probing */ | 1083 | /* record not found, but not probing. Maybe stretch wrong ? Restart probing */ |
1084 | if (SUD.autoprobe) { | 1084 | if (SUD.autoprobe) { |
1085 | SUDT = disk_type + StartDiskType[DriveType]; | 1085 | SUDT = atari_disk_type + StartDiskType[DriveType]; |
1086 | set_capacity(unit[SelectedDrive].disk, | 1086 | set_capacity(unit[SelectedDrive].disk, |
1087 | SUDT->blocks); | 1087 | SUDT->blocks); |
1088 | Probing = 1; | 1088 | Probing = 1; |
@@ -1421,7 +1421,7 @@ repeat: | |||
1421 | if (type == 0) { | 1421 | if (type == 0) { |
1422 | if (!UDT) { | 1422 | if (!UDT) { |
1423 | Probing = 1; | 1423 | Probing = 1; |
1424 | UDT = disk_type + StartDiskType[DriveType]; | 1424 | UDT = atari_disk_type + StartDiskType[DriveType]; |
1425 | set_capacity(floppy->disk, UDT->blocks); | 1425 | set_capacity(floppy->disk, UDT->blocks); |
1426 | UD.autoprobe = 1; | 1426 | UD.autoprobe = 1; |
1427 | } | 1427 | } |
@@ -1439,7 +1439,7 @@ repeat: | |||
1439 | goto repeat; | 1439 | goto repeat; |
1440 | } | 1440 | } |
1441 | type = minor2disktype[type].index; | 1441 | type = minor2disktype[type].index; |
1442 | UDT = &disk_type[type]; | 1442 | UDT = &atari_disk_type[type]; |
1443 | set_capacity(floppy->disk, UDT->blocks); | 1443 | set_capacity(floppy->disk, UDT->blocks); |
1444 | UD.autoprobe = 0; | 1444 | UD.autoprobe = 0; |
1445 | } | 1445 | } |
@@ -1505,7 +1505,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, | |||
1505 | if (minor2disktype[type].drive_types > DriveType) | 1505 | if (minor2disktype[type].drive_types > DriveType) |
1506 | return -ENODEV; | 1506 | return -ENODEV; |
1507 | type = minor2disktype[type].index; | 1507 | type = minor2disktype[type].index; |
1508 | dtp = &disk_type[type]; | 1508 | dtp = &atari_disk_type[type]; |
1509 | if (UD.flags & FTD_MSG) | 1509 | if (UD.flags & FTD_MSG) |
1510 | printk (KERN_ERR "floppy%d: found dtp %p name %s!\n", | 1510 | printk (KERN_ERR "floppy%d: found dtp %p name %s!\n", |
1511 | drive, dtp, dtp->name); | 1511 | drive, dtp, dtp->name); |
@@ -1576,7 +1576,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, | |||
1576 | continue; | 1576 | continue; |
1577 | } | 1577 | } |
1578 | setidx = minor2disktype[settype].index; | 1578 | setidx = minor2disktype[settype].index; |
1579 | dtp = &disk_type[setidx]; | 1579 | dtp = &atari_disk_type[setidx]; |
1580 | 1580 | ||
1581 | /* found matching entry ?? */ | 1581 | /* found matching entry ?? */ |
1582 | if ( dtp->blocks == setprm.size | 1582 | if ( dtp->blocks == setprm.size |