diff options
author | Joe Perches <joe@perches.com> | 2010-03-10 18:21:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:30 -0500 |
commit | 29f1c7848feb3954939b52fd5b7dca30dbce9426 (patch) | |
tree | 5a3c90cf9c10a2e760fb98c2261f35876f520dfd /drivers | |
parent | 4d18ef09dfe4d1272446ad55ce5d7b06ff4b9ca8 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/floppy.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 6b75e70ca628..e080e1930cc1 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -290,7 +290,7 @@ static inline void fallback_on_nodma_alloc(char **addr, size_t l) | |||
290 | /* End dma memory related stuff */ | 290 | /* End dma memory related stuff */ |
291 | 291 | ||
292 | static unsigned long fake_change; | 292 | static unsigned long fake_change; |
293 | static int initialising = 1; | 293 | static bool initialized; |
294 | 294 | ||
295 | #define ITYPE(x) (((x) >> 2) & 0x1f) | 295 | #define ITYPE(x) (((x) >> 2) & 0x1f) |
296 | #define TOMINOR(x) ((x & 3) | ((x & 4) << 5)) | 296 | #define TOMINOR(x) ((x & 3) | ((x & 4) << 5)) |
@@ -1147,7 +1147,7 @@ static int wait_til_ready(void) | |||
1147 | if (status & STATUS_READY) | 1147 | if (status & STATUS_READY) |
1148 | return status; | 1148 | return status; |
1149 | } | 1149 | } |
1150 | if (!initialising) { | 1150 | if (initialized) { |
1151 | DPRINT("Getstatus times out (%x) on fdc %d\n", status, fdc); | 1151 | DPRINT("Getstatus times out (%x) on fdc %d\n", status, fdc); |
1152 | show_floppy(); | 1152 | show_floppy(); |
1153 | } | 1153 | } |
@@ -1173,7 +1173,7 @@ static int output_byte(char byte) | |||
1173 | return 0; | 1173 | return 0; |
1174 | } | 1174 | } |
1175 | FDCS->reset = 1; | 1175 | FDCS->reset = 1; |
1176 | if (!initialising) { | 1176 | if (initialized) { |
1177 | DPRINT("Unable to send byte %x to FDC. Fdc=%x Status=%x\n", | 1177 | DPRINT("Unable to send byte %x to FDC. Fdc=%x Status=%x\n", |
1178 | byte, fdc, status); | 1178 | byte, fdc, status); |
1179 | show_floppy(); | 1179 | show_floppy(); |
@@ -1204,10 +1204,9 @@ static int result(void) | |||
1204 | else | 1204 | else |
1205 | break; | 1205 | break; |
1206 | } | 1206 | } |
1207 | if (!initialising) { | 1207 | if (initialized) { |
1208 | DPRINT | 1208 | DPRINT("get result error. Fdc=%d Last status=%x Read bytes=%d\n", |
1209 | ("get result error. Fdc=%d Last status=%x Read bytes=%d\n", | 1209 | fdc, status, i); |
1210 | fdc, status, i); | ||
1211 | show_floppy(); | 1210 | show_floppy(); |
1212 | } | 1211 | } |
1213 | FDCS->reset = 1; | 1212 | FDCS->reset = 1; |
@@ -1754,7 +1753,7 @@ irqreturn_t floppy_interrupt(int irq, void *dev_id) | |||
1754 | * activity. | 1753 | * activity. |
1755 | */ | 1754 | */ |
1756 | 1755 | ||
1757 | do_print = !handler && print_unex && !initialising; | 1756 | do_print = !handler && print_unex && initialized; |
1758 | 1757 | ||
1759 | inr = result(); | 1758 | inr = result(); |
1760 | if (do_print) | 1759 | if (do_print) |
@@ -1882,7 +1881,7 @@ static void floppy_shutdown(unsigned long data) | |||
1882 | { | 1881 | { |
1883 | unsigned long flags; | 1882 | unsigned long flags; |
1884 | 1883 | ||
1885 | if (!initialising) | 1884 | if (initialized) |
1886 | show_floppy(); | 1885 | show_floppy(); |
1887 | cancel_activity(); | 1886 | cancel_activity(); |
1888 | 1887 | ||
@@ -1894,7 +1893,7 @@ static void floppy_shutdown(unsigned long data) | |||
1894 | 1893 | ||
1895 | /* avoid dma going to a random drive after shutdown */ | 1894 | /* avoid dma going to a random drive after shutdown */ |
1896 | 1895 | ||
1897 | if (!initialising) | 1896 | if (initialized) |
1898 | DPRINT("floppy timeout called\n"); | 1897 | DPRINT("floppy timeout called\n"); |
1899 | FDCS->reset = 1; | 1898 | FDCS->reset = 1; |
1900 | if (cont) { | 1899 | if (cont) { |
@@ -4337,7 +4336,7 @@ static int __init floppy_init(void) | |||
4337 | fdc = 0; | 4336 | fdc = 0; |
4338 | del_timer(&fd_timeout); | 4337 | del_timer(&fd_timeout); |
4339 | current_drive = 0; | 4338 | current_drive = 0; |
4340 | initialising = 0; | 4339 | initialized = true; |
4341 | if (have_no_fdc) { | 4340 | if (have_no_fdc) { |
4342 | DPRINT("no floppy controllers found\n"); | 4341 | DPRINT("no floppy controllers found\n"); |
4343 | err = have_no_fdc; | 4342 | err = have_no_fdc; |