From 071704ed61b112c96f5cd0f353070354674216e2 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 13 Aug 2006 10:46:35 +0200 Subject: [GCC4] fix build error in drivers/block/xd.c 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 --- drivers/block/xd.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/block/xd.c b/drivers/block/xd.c index 5014c45..8f72792 100644 --- a/drivers/block/xd.c +++ b/drivers/block/xd.c @@ -125,7 +125,12 @@ static int xd_sizes[XD_MAXDRIVES << 6], 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, @@ -138,13 +143,6 @@ static struct gendisk xd_gendisk = { 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 }; -- 1.4.2