]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/i2c/busses/i2c-amd756.c
afs: the AFS RPC op CBGetCapabilities is actually CBTellMeAboutYourself
[linux-2.6-omap-h63xx.git] / drivers / i2c / busses / i2c-amd756.c
index 7490dc1771ae11f4e1335d53aff103549f0515c5..2fa43183d3759bc8b2d1ea284ca30984aee44fad 100644 (file)
@@ -334,6 +334,10 @@ static int __devinit amd756_probe(struct pci_dev *pdev,
        int error;
        u8 temp;
        
+       /* driver_data might come from user-space, so check it */
+       if (id->driver_data >= ARRAY_SIZE(chipname))
+               return -EINVAL;
+
        if (amd756_ioport) {
                dev_err(&pdev->dev, "Only one device supported "
                       "(you have a strange motherboard, btw)\n");
@@ -405,6 +409,7 @@ static struct pci_driver amd756_driver = {
        .id_table       = amd756_ids,
        .probe          = amd756_probe,
        .remove         = __devexit_p(amd756_remove),
+       .dynids.use_driver_data = 1,
 };
 
 static int __init amd756_init(void)