[SCSI] fix compile error on module_refcount

LD      .tmp_vmlinux1
drivers/built-in.o(.text+0x8e1f9): In function `scsi_device_put':
drivers/scsi/scsi.c:887: undefined reference to `module_refcount'
make: *** [.tmp_vmlinux1] Error 1

There are only two users of module_refcount() outside of kernel/module.c
and the other one uses ifdef's similar to this.

Signed-Off-By: Daniel Walker <dwalker@mvista.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
Daniel Walker 2006-09-09 09:31:03 -07:00 committed by James Bottomley
parent 2b7cbe2017
commit a506b44bb5

View File

@ -875,10 +875,12 @@ void scsi_device_put(struct scsi_device *sdev)
{ {
struct module *module = sdev->host->hostt->module; struct module *module = sdev->host->hostt->module;
#ifdef CONFIG_MODULE_UNLOAD
/* The module refcount will be zero if scsi_device_get() /* The module refcount will be zero if scsi_device_get()
* was called from a module removal routine */ * was called from a module removal routine */
if (module && module_refcount(module) != 0) if (module && module_refcount(module) != 0)
module_put(module); module_put(module);
#endif
put_device(&sdev->sdev_gendev); put_device(&sdev->sdev_gendev);
} }
EXPORT_SYMBOL(scsi_device_put); EXPORT_SYMBOL(scsi_device_put);