diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/base/platform.c | 7 | ||||
| -rw-r--r-- | drivers/gpio/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/scsi/qlogicpti.c | 13 |
3 files changed, 9 insertions, 13 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 8727e9c5eea4..72c776f2a1f5 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
| @@ -83,9 +83,16 @@ EXPORT_SYMBOL_GPL(platform_get_resource); | |||
| 83 | */ | 83 | */ |
| 84 | int platform_get_irq(struct platform_device *dev, unsigned int num) | 84 | int platform_get_irq(struct platform_device *dev, unsigned int num) |
| 85 | { | 85 | { |
| 86 | #ifdef CONFIG_SPARC | ||
| 87 | /* sparc does not have irqs represented as IORESOURCE_IRQ resources */ | ||
| 88 | if (!dev || num >= dev->archdata.num_irqs) | ||
| 89 | return -ENXIO; | ||
| 90 | return dev->archdata.irqs[num]; | ||
| 91 | #else | ||
| 86 | struct resource *r = platform_get_resource(dev, IORESOURCE_IRQ, num); | 92 | struct resource *r = platform_get_resource(dev, IORESOURCE_IRQ, num); |
| 87 | 93 | ||
| 88 | return r ? r->start : -ENXIO; | 94 | return r ? r->start : -ENXIO; |
| 95 | #endif | ||
| 89 | } | 96 | } |
| 90 | EXPORT_SYMBOL_GPL(platform_get_irq); | 97 | EXPORT_SYMBOL_GPL(platform_get_irq); |
| 91 | 98 | ||
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index d055cee36942..f11d8e3b4041 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig | |||
| @@ -47,7 +47,7 @@ if GPIOLIB | |||
| 47 | 47 | ||
| 48 | config OF_GPIO | 48 | config OF_GPIO |
| 49 | def_bool y | 49 | def_bool y |
| 50 | depends on OF && !SPARC | 50 | depends on OF |
| 51 | 51 | ||
| 52 | config DEBUG_GPIO | 52 | config DEBUG_GPIO |
| 53 | bool "Debug GPIO calls" | 53 | bool "Debug GPIO calls" |
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index b191dd549207..71fddbc60f18 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c | |||
| @@ -1294,26 +1294,19 @@ static struct scsi_host_template qpti_template = { | |||
| 1294 | static const struct of_device_id qpti_match[]; | 1294 | static const struct of_device_id qpti_match[]; |
| 1295 | static int __devinit qpti_sbus_probe(struct platform_device *op) | 1295 | static int __devinit qpti_sbus_probe(struct platform_device *op) |
| 1296 | { | 1296 | { |
| 1297 | const struct of_device_id *match; | ||
| 1298 | struct scsi_host_template *tpnt; | ||
| 1299 | struct device_node *dp = op->dev.of_node; | 1297 | struct device_node *dp = op->dev.of_node; |
| 1300 | struct Scsi_Host *host; | 1298 | struct Scsi_Host *host; |
| 1301 | struct qlogicpti *qpti; | 1299 | struct qlogicpti *qpti; |
| 1302 | static int nqptis; | 1300 | static int nqptis; |
| 1303 | const char *fcode; | 1301 | const char *fcode; |
| 1304 | 1302 | ||
| 1305 | match = of_match_device(qpti_match, &op->dev); | ||
| 1306 | if (!match) | ||
| 1307 | return -EINVAL; | ||
| 1308 | tpnt = match->data; | ||
| 1309 | |||
| 1310 | /* Sometimes Antares cards come up not completely | 1303 | /* Sometimes Antares cards come up not completely |
| 1311 | * setup, and we get a report of a zero IRQ. | 1304 | * setup, and we get a report of a zero IRQ. |
| 1312 | */ | 1305 | */ |
| 1313 | if (op->archdata.irqs[0] == 0) | 1306 | if (op->archdata.irqs[0] == 0) |
| 1314 | return -ENODEV; | 1307 | return -ENODEV; |
| 1315 | 1308 | ||
| 1316 | host = scsi_host_alloc(tpnt, sizeof(struct qlogicpti)); | 1309 | host = scsi_host_alloc(&qpti_template, sizeof(struct qlogicpti)); |
| 1317 | if (!host) | 1310 | if (!host) |
| 1318 | return -ENOMEM; | 1311 | return -ENOMEM; |
| 1319 | 1312 | ||
| @@ -1445,19 +1438,15 @@ static int __devexit qpti_sbus_remove(struct platform_device *op) | |||
| 1445 | static const struct of_device_id qpti_match[] = { | 1438 | static const struct of_device_id qpti_match[] = { |
| 1446 | { | 1439 | { |
| 1447 | .name = "ptisp", | 1440 | .name = "ptisp", |
| 1448 | .data = &qpti_template, | ||
| 1449 | }, | 1441 | }, |
| 1450 | { | 1442 | { |
| 1451 | .name = "PTI,ptisp", | 1443 | .name = "PTI,ptisp", |
| 1452 | .data = &qpti_template, | ||
| 1453 | }, | 1444 | }, |
| 1454 | { | 1445 | { |
| 1455 | .name = "QLGC,isp", | 1446 | .name = "QLGC,isp", |
| 1456 | .data = &qpti_template, | ||
| 1457 | }, | 1447 | }, |
| 1458 | { | 1448 | { |
| 1459 | .name = "SUNW,isp", | 1449 | .name = "SUNW,isp", |
| 1460 | .data = &qpti_template, | ||
| 1461 | }, | 1450 | }, |
| 1462 | {}, | 1451 | {}, |
| 1463 | }; | 1452 | }; |
