This patch fixes this error with gcc 4 :
xd.c:141: error: static declaration of 'xd_fops' follows non-static declaration
xd.c:128: error: previous declaration of 'xd_fops' was here
static int xd_blocksizes[XD_MAXDRIVES << 6];
static int xd_maxsect[XD_MAXDRIVES << 6];
-extern struct block_device_operations xd_fops;
+static struct block_device_operations xd_fops = {
+ owner: THIS_MODULE,
+ open: xd_open,
+ release: xd_release,
+ ioctl: xd_ioctl,
+};
static struct gendisk xd_gendisk = {
major: MAJOR_NR,
fops: &xd_fops,
};
-static struct block_device_operations xd_fops = {
- owner: THIS_MODULE,
- open: xd_open,
- release: xd_release,
- ioctl: xd_ioctl,
-};
-
static DECLARE_WAIT_QUEUE_HEAD(xd_wait_int);
static DECLARE_WAIT_QUEUE_HEAD(xd_wait_open);
static u8 xd_valid[XD_MAXDRIVES] = { 0,0 };