Commit 8a0817d5 authored by Adrian Bunk's avatar Adrian Bunk Committed by James Bottomley

[PATCH] qla1280.c doesn't compile

On Wed, Jan 07, 2004 at 11:28:31PM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.1-rc1-mm2:
>...
> -qla1280-update.patch
> +qla1280-update-2.patch
>
>  Updated qlogic patch
>...

I got the following compile error when trying to compile this driver
statically into a kernel with hotplug enabled:


<--  snip  -->

...
drivers/scsi/qla1280.c:4849: error: `qla1280_remove_one' undeclared here
(not in a function)
drivers/scsi/qla1280.c:4849: error: initializer element is not constant
drivers/scsi/qla1280.c:4849: error: (near initialization for
`qla1280_pci_driver.remove')
make[2]: *** [drivers/scsi/qla1280.o] Error 1

<--  snip  -->


Since I don't see a good reason why qla1280_remove_one is #ifdef'ed out
in the non-modular case the patch below fixes this problem by removing
two #ifdef's.
parent c5dd257a
......@@ -480,9 +480,7 @@ static inline void scsi_host_put(struct Scsi_Host *h)
#endif
static int qla1280_probe_one(struct pci_dev *, const struct pci_device_id *);
#if defined(CONFIG_SCSI_QLOGIC_1280_MODULE) || (LINUX_VERSION_CODE < 0x020600)
static void qla1280_remove_one(struct pci_dev *);
#endif
/*
* QLogic Driver Support Function Prototypes.
......@@ -4807,7 +4805,6 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
}
#if defined(CONFIG_SCSI_QLOGIC_1280_MODULE) || (LINUX_VERSION_CODE < 0x020600)
static void __devexit
qla1280_remove_one(struct pci_dev *pdev)
{
......@@ -4839,7 +4836,6 @@ qla1280_remove_one(struct pci_dev *pdev)
scsi_host_put(host);
}
#endif
#if LINUX_VERSION_CODE >= 0x020600
static struct pci_driver qla1280_pci_driver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment