[-mm patch] drivers/block/amiflop.c: fix compilation

From: Adrian Bunk
Date: Sat Jan 07 2006 - 13:01:13 EST


add-block_device_operationsgetgeo-block-device-method.patch causes the
following compile error:

<-- snip -->

...
CC drivers/block/amiflop.o
drivers/block/amiflop.c: In function `fd_getgeo':
drivers/block/amiflop.c:1431: warning: implicit declaration of function `minor'
...
LD .tmp_vmlinux1
...
drivers/built-in.o(.text+0x215cc): In function `fd_getgeo':
: undefined reference to `minor'
make: *** [.tmp_vmlinux1] Error 1

<-- snip -->


Signed-off-by: Adrian Bunk <bunk@xxxxxxxxx>

--- linux-2.6.15-mm2-m68k/drivers/block/amiflop.c.old 2006-01-07 18:22:21.000000000 +0100
+++ linux-2.6.15-mm2-m68k/drivers/block/amiflop.c 2006-01-07 18:22:30.000000000 +0100
@@ -1428,7 +1428,7 @@

static int fd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
{
- int drive = minor(bdev->bd_dev) & 3;
+ int drive = MINOR(bdev->bd_dev) & 3;

geo->heads = unit[drive].type->heads;
geo->sectors = unit[drive].dtype->sects * unit[drive].type->sect_mult;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/