Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765308AbXHVQ2X (ORCPT ); Wed, 22 Aug 2007 12:28:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932920AbXHVQ2G (ORCPT ); Wed, 22 Aug 2007 12:28:06 -0400 Received: from palinux.external.hp.com ([192.25.206.14]:35243 "EHLO mail.parisc-linux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932896AbXHVQ2E (ORCPT ); Wed, 22 Aug 2007 12:28:04 -0400 Date: Wed, 22 Aug 2007 10:28:02 -0600 From: Matthew Wilcox To: Gabriel C Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Subject: Re: drivers/scsi/advansys.c - ld error ( Re: 2.6.23-rc3-mm1 ) Message-ID: <20070822162802.GJ9163@parisc-linux.org> References: <20070822020648.5ea3a612.akpm@linux-foundation.org> <46CC6112.9030705@googlemail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46CC6112.9030705@googlemail.com> User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1501 Lines: 47 On Wed, Aug 22, 2007 at 06:15:14PM +0200, Gabriel C wrote: > advansys.c:(.init.text+0x38ea): undefined reference to `isa_register_driver' > I guess advansys_{init,exit} is missing some #ifdef's .. That's one conclusion. I prefer to think that the ISA support should behave the same as the PCI and EISA support: ---- When CONFIG_ISA is disabled, the isa_driver support will not be compiled in. Define stubs so that we don't get link-time errors. Signed-off-by: Matthew Wilcox diff --git a/include/linux/isa.h b/include/linux/isa.h index 1b85533..b0270e3 100644 --- a/include/linux/isa.h +++ b/include/linux/isa.h @@ -22,7 +22,18 @@ struct isa_driver { #define to_isa_driver(x) container_of((x), struct isa_driver, driver) +#ifdef CONFIG_ISA int isa_register_driver(struct isa_driver *, unsigned int); void isa_unregister_driver(struct isa_driver *); +#else +static inline int isa_register_driver(struct isa_driver *d, unsigned int i) +{ + return 0; +} + +static inline void isa_unregister_driver(struct isa_driver *d) +{ +} +#endif #endif /* __LINUX_ISA_H */ -- "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/