提交 5ceadd2a 编写于 作者: G Geert Uytterhoeven 提交者: Linus Torvalds

Atari floppy: Rename disk_type to atari_disk_type

Commit edfaa7c3

    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: NGeert Uytterhoeven <geert@linux-m68k.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 7129b126
...@@ -90,7 +90,7 @@ static struct atari_disk_type { ...@@ -90,7 +90,7 @@ static struct atari_disk_type {
unsigned blocks; /* total number of blocks */ unsigned blocks; /* total number of blocks */
unsigned fdc_speed; /* fdc_speed setting */ unsigned fdc_speed; /* fdc_speed setting */
unsigned stretch; /* track doubling ? */ unsigned stretch; /* track doubling ? */
} disk_type[] = { } atari_disk_type[] = {
{ "d360", 9, 720, 0, 0}, /* 0: 360kB diskette */ { "d360", 9, 720, 0, 0}, /* 0: 360kB diskette */
{ "D360", 9, 720, 0, 1}, /* 1: 360kb in 720k or 1.2MB drive */ { "D360", 9, 720, 0, 1}, /* 1: 360kb in 720k or 1.2MB drive */
{ "D720", 9,1440, 0, 0}, /* 2: 720kb in 720k or 1.2MB drive */ { "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,7 +658,7 @@ static int do_format(int drive, int type, struct atari_format_descr *desc)
return -EINVAL; return -EINVAL;
} }
type = minor2disktype[type].index; type = minor2disktype[type].index;
UDT = &disk_type[type]; UDT = &atari_disk_type[type];
} }
if (!UDT || desc->track >= UDT->blocks/UDT->spt/2 || desc->head >= 2) { if (!UDT || desc->track >= UDT->blocks/UDT->spt/2 || desc->head >= 2) {
...@@ -1064,7 +1064,7 @@ static void fd_rwsec_done1(int status) ...@@ -1064,7 +1064,7 @@ static void fd_rwsec_done1(int status)
searched for a non-existent sector! */ searched for a non-existent sector! */
!(read_track && FDC_READ(FDCREG_SECTOR) > SUDT->spt)) { !(read_track && FDC_READ(FDCREG_SECTOR) > SUDT->spt)) {
if (Probing) { if (Probing) {
if (SUDT > disk_type) { if (SUDT > atari_disk_type) {
if (SUDT[-1].blocks > ReqBlock) { if (SUDT[-1].blocks > ReqBlock) {
/* try another disk type */ /* try another disk type */
SUDT--; SUDT--;
...@@ -1082,7 +1082,7 @@ static void fd_rwsec_done1(int status) ...@@ -1082,7 +1082,7 @@ static void fd_rwsec_done1(int status)
} else { } else {
/* record not found, but not probing. Maybe stretch wrong ? Restart probing */ /* record not found, but not probing. Maybe stretch wrong ? Restart probing */
if (SUD.autoprobe) { if (SUD.autoprobe) {
SUDT = disk_type + StartDiskType[DriveType]; SUDT = atari_disk_type + StartDiskType[DriveType];
set_capacity(unit[SelectedDrive].disk, set_capacity(unit[SelectedDrive].disk,
SUDT->blocks); SUDT->blocks);
Probing = 1; Probing = 1;
...@@ -1421,7 +1421,7 @@ static void redo_fd_request(void) ...@@ -1421,7 +1421,7 @@ static void redo_fd_request(void)
if (type == 0) { if (type == 0) {
if (!UDT) { if (!UDT) {
Probing = 1; Probing = 1;
UDT = disk_type + StartDiskType[DriveType]; UDT = atari_disk_type + StartDiskType[DriveType];
set_capacity(floppy->disk, UDT->blocks); set_capacity(floppy->disk, UDT->blocks);
UD.autoprobe = 1; UD.autoprobe = 1;
} }
...@@ -1439,7 +1439,7 @@ static void redo_fd_request(void) ...@@ -1439,7 +1439,7 @@ static void redo_fd_request(void)
goto repeat; goto repeat;
} }
type = minor2disktype[type].index; type = minor2disktype[type].index;
UDT = &disk_type[type]; UDT = &atari_disk_type[type];
set_capacity(floppy->disk, UDT->blocks); set_capacity(floppy->disk, UDT->blocks);
UD.autoprobe = 0; UD.autoprobe = 0;
} }
...@@ -1505,7 +1505,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, ...@@ -1505,7 +1505,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp,
if (minor2disktype[type].drive_types > DriveType) if (minor2disktype[type].drive_types > DriveType)
return -ENODEV; return -ENODEV;
type = minor2disktype[type].index; type = minor2disktype[type].index;
dtp = &disk_type[type]; dtp = &atari_disk_type[type];
if (UD.flags & FTD_MSG) if (UD.flags & FTD_MSG)
printk (KERN_ERR "floppy%d: found dtp %p name %s!\n", printk (KERN_ERR "floppy%d: found dtp %p name %s!\n",
drive, dtp, dtp->name); drive, dtp, dtp->name);
...@@ -1576,7 +1576,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, ...@@ -1576,7 +1576,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp,
continue; continue;
} }
setidx = minor2disktype[settype].index; setidx = minor2disktype[settype].index;
dtp = &disk_type[setidx]; dtp = &atari_disk_type[setidx];
/* found matching entry ?? */ /* found matching entry ?? */
if ( dtp->blocks == setprm.size if ( dtp->blocks == setprm.size
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册