Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Daniel Walker and committed by
James Bottomley
a506b44b 2b7cbe20

+2
+2
drivers/scsi/scsi.c
··· 875 875 { 876 876 struct module *module = sdev->host->hostt->module; 877 877 878 + #ifdef CONFIG_MODULE_UNLOAD 878 879 /* The module refcount will be zero if scsi_device_get() 879 880 * was called from a module removal routine */ 880 881 if (module && module_refcount(module) != 0) 881 882 module_put(module); 883 + #endif 882 884 put_device(&sdev->sdev_gendev); 883 885 } 884 886 EXPORT_SYMBOL(scsi_device_put);