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

fix CONFIG_SATA_SIS=y compile error

Static code shouldn't be used from other modules.

drivers/built-in.o: In function `sis_init_one':
sata_sis.c:(.text+0x7634cd): undefined reference to `sis_info133'
sata_sis.c:(.text+0x7634d6): undefined reference to `sis_info133'

While I was at it, I also moved the prototype of this struct to a header
file.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

authored by

Adrian Bunk and committed by
Jeff Garzik
77a527ea 9b14dec5

+6 -4
+3
drivers/ata/libata.h
··· 136 136 /* libata-sff.c */ 137 137 extern u8 ata_irq_on(struct ata_port *ap); 138 138 139 + /* pata_sis.c */ 140 + extern struct ata_port_info sis_info133; 141 + 139 142 #endif /* __LIBATA_H__ */
+2 -1
drivers/ata/pata_sis.c
··· 32 32 #include <scsi/scsi_host.h> 33 33 #include <linux/libata.h> 34 34 #include <linux/ata.h> 35 + #include "libata.h" 35 36 36 37 #define DRV_NAME "pata_sis" 37 38 #define DRV_VERSION "0.4.5" ··· 782 781 .pio_mask = 0x1f, /* pio0-4 */ 783 782 .port_ops = &sis_66_ops, 784 783 }; 785 - static struct ata_port_info sis_info133 = { 784 + struct ata_port_info sis_info133 = { 786 785 .sht = &sis_sht, 787 786 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, 788 787 .pio_mask = 0x1f, /* pio0-4 */
+1 -3
drivers/ata/sata_sis.c
··· 40 40 #include <linux/device.h> 41 41 #include <scsi/scsi_host.h> 42 42 #include <linux/libata.h> 43 + #include "libata.h" 43 44 44 45 #define DRV_NAME "sata_sis" 45 46 #define DRV_VERSION "0.7" ··· 255 254 256 255 static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) 257 256 { 258 - /* Provided by the PATA driver */ 259 - extern struct ata_port_info sis_info133; 260 - 261 257 static int printed_version; 262 258 struct ata_probe_ent *probe_ent = NULL; 263 259 int rc;