From fac829fdcaf451a20106cbc468ff886466320956 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Wed, 3 Mar 2010 11:06:56 +0530 Subject: [SCSI] raid_attrs: fix dependency problems RAID attributes uses scsi_is_sdev_device() to gate some SCSI specific checking code. This causes two problems. Firstly if SCSI == n just defining scsi_is_sdev_device() to return false might not be enough to prevent gcc from emitting the code (and thus referring to undefined symbols), so this needs surrounding with an ifdef. Secondly, using scsi_is_sdev_device() when SCSI is either y or m gives a subtle problem in the m case: raid_attrs must also be m to use the symbol. Do the usual Kconfig jiggery-pokery to fix this. Reported-by: Randy Dunlap Signed-off-by: James Bottomley --- drivers/scsi/raid_class.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/scsi/raid_class.c') diff --git a/drivers/scsi/raid_class.c b/drivers/scsi/raid_class.c index bd88349b8526..2c146b44d95f 100644 --- a/drivers/scsi/raid_class.c +++ b/drivers/scsi/raid_class.c @@ -63,6 +63,7 @@ static int raid_match(struct attribute_container *cont, struct device *dev) * emulated RAID devices, so start with SCSI */ struct raid_internal *i = ac_to_raid_internal(cont); +#if defined(CONFIG_SCSI) || defined(CONFIG_SCSI_MODULE) if (scsi_is_sdev_device(dev)) { struct scsi_device *sdev = to_scsi_device(dev); @@ -71,6 +72,7 @@ static int raid_match(struct attribute_container *cont, struct device *dev) return i->f->is_raid(dev); } +#endif /* FIXME: look at other subsystems too */ return 0; } -- cgit v1.2.3