drivers/block/floppy.c: convert int initialising to bool initialized
Don't initialize initialized either. Default is false. Signed-off-by: Joe Perches <joe@perches.com> Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
4d18ef09df
commit
29f1c7848f
1 changed files with 10 additions and 11 deletions
|
@ -290,7 +290,7 @@ static inline void fallback_on_nodma_alloc(char **addr, size_t l)
|
||||||
/* End dma memory related stuff */
|
/* End dma memory related stuff */
|
||||||
|
|
||||||
static unsigned long fake_change;
|
static unsigned long fake_change;
|
||||||
static int initialising = 1;
|
static bool initialized;
|
||||||
|
|
||||||
#define ITYPE(x) (((x) >> 2) & 0x1f)
|
#define ITYPE(x) (((x) >> 2) & 0x1f)
|
||||||
#define TOMINOR(x) ((x & 3) | ((x & 4) << 5))
|
#define TOMINOR(x) ((x & 3) | ((x & 4) << 5))
|
||||||
|
@ -1147,7 +1147,7 @@ static int wait_til_ready(void)
|
||||||
if (status & STATUS_READY)
|
if (status & STATUS_READY)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
if (!initialising) {
|
if (initialized) {
|
||||||
DPRINT("Getstatus times out (%x) on fdc %d\n", status, fdc);
|
DPRINT("Getstatus times out (%x) on fdc %d\n", status, fdc);
|
||||||
show_floppy();
|
show_floppy();
|
||||||
}
|
}
|
||||||
|
@ -1173,7 +1173,7 @@ static int output_byte(char byte)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
FDCS->reset = 1;
|
FDCS->reset = 1;
|
||||||
if (!initialising) {
|
if (initialized) {
|
||||||
DPRINT("Unable to send byte %x to FDC. Fdc=%x Status=%x\n",
|
DPRINT("Unable to send byte %x to FDC. Fdc=%x Status=%x\n",
|
||||||
byte, fdc, status);
|
byte, fdc, status);
|
||||||
show_floppy();
|
show_floppy();
|
||||||
|
@ -1204,10 +1204,9 @@ static int result(void)
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!initialising) {
|
if (initialized) {
|
||||||
DPRINT
|
DPRINT("get result error. Fdc=%d Last status=%x Read bytes=%d\n",
|
||||||
("get result error. Fdc=%d Last status=%x Read bytes=%d\n",
|
fdc, status, i);
|
||||||
fdc, status, i);
|
|
||||||
show_floppy();
|
show_floppy();
|
||||||
}
|
}
|
||||||
FDCS->reset = 1;
|
FDCS->reset = 1;
|
||||||
|
@ -1754,7 +1753,7 @@ irqreturn_t floppy_interrupt(int irq, void *dev_id)
|
||||||
* activity.
|
* activity.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
do_print = !handler && print_unex && !initialising;
|
do_print = !handler && print_unex && initialized;
|
||||||
|
|
||||||
inr = result();
|
inr = result();
|
||||||
if (do_print)
|
if (do_print)
|
||||||
|
@ -1882,7 +1881,7 @@ static void floppy_shutdown(unsigned long data)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if (!initialising)
|
if (initialized)
|
||||||
show_floppy();
|
show_floppy();
|
||||||
cancel_activity();
|
cancel_activity();
|
||||||
|
|
||||||
|
@ -1894,7 +1893,7 @@ static void floppy_shutdown(unsigned long data)
|
||||||
|
|
||||||
/* avoid dma going to a random drive after shutdown */
|
/* avoid dma going to a random drive after shutdown */
|
||||||
|
|
||||||
if (!initialising)
|
if (initialized)
|
||||||
DPRINT("floppy timeout called\n");
|
DPRINT("floppy timeout called\n");
|
||||||
FDCS->reset = 1;
|
FDCS->reset = 1;
|
||||||
if (cont) {
|
if (cont) {
|
||||||
|
@ -4337,7 +4336,7 @@ static int __init floppy_init(void)
|
||||||
fdc = 0;
|
fdc = 0;
|
||||||
del_timer(&fd_timeout);
|
del_timer(&fd_timeout);
|
||||||
current_drive = 0;
|
current_drive = 0;
|
||||||
initialising = 0;
|
initialized = true;
|
||||||
if (have_no_fdc) {
|
if (have_no_fdc) {
|
||||||
DPRINT("no floppy controllers found\n");
|
DPRINT("no floppy controllers found\n");
|
||||||
err = have_no_fdc;
|
err = have_no_fdc;
|
||||||
|
|
Loading…
Add table
Reference in a new issue