X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fi2c%2Fbusses%2Fscx200_acb.c;h=1c4159a93623fdfb39eaf32634c925ad1006f709;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=62b7614e55a8755a70e49e7f2d74a5886136707f;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index 62b7614e5..1c4159a93 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c @@ -45,8 +45,7 @@ MODULE_LICENSE("GPL"); #define MAX_DEVICES 4 static int base[MAX_DEVICES] = { 0x820, 0x840 }; -static int num_base; -module_param_array(base, int, num_base, 0); +module_param_array(base, int, NULL, 0); MODULE_PARM_DESC(base, "Base addresses for the ACCESS.bus controllers"); #ifdef DEBUG @@ -403,9 +402,9 @@ static struct i2c_algorithm scx200_acb_algorithm = { .functionality = scx200_acb_func, }; -struct scx200_acb_iface *scx200_acb_list; +static struct scx200_acb_iface *scx200_acb_list; -int scx200_acb_probe(struct scx200_acb_iface *iface) +static int scx200_acb_probe(struct scx200_acb_iface *iface) { u8 val; @@ -503,6 +502,12 @@ static int __init scx200_acb_create(int base, int index) return rc; } +static struct pci_device_id scx200[] = { + { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_BRIDGE) }, + { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE) }, + { }, +}; + static int __init scx200_acb_init(void) { int i; @@ -511,12 +516,7 @@ static int __init scx200_acb_init(void) pr_debug(NAME ": NatSemi SCx200 ACCESS.bus Driver\n"); /* Verify that this really is a SCx200 processor */ - if (pci_find_device(PCI_VENDOR_ID_NS, - PCI_DEVICE_ID_NS_SCx200_BRIDGE, - NULL) == NULL - && pci_find_device(PCI_VENDOR_ID_NS, - PCI_DEVICE_ID_NS_SC1100_BRIDGE, - NULL) == NULL) + if (pci_dev_present(scx200) == 0) return -ENODEV; rc = -ENXIO;