aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-05-08 03:36:49 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-05-08 19:41:49 -0400
commit15576bc8adb33d58867942385ae849cc48379610 (patch)
tree4c2d2fd12ab32d41d9dc96020702f0df4028f4a8
parent28113a9941c8cb6ca90ab4a66876db84342a084b (diff)
[QLA2XXX]: Fix build on sparc.
We now use pci_device_to_OF_node() to get properties and of_get_property() returns const pointers. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 3e296ab845b6..089fc7940d8b 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -13,7 +13,6 @@
13 13
14#ifdef CONFIG_SPARC 14#ifdef CONFIG_SPARC
15#include <asm/prom.h> 15#include <asm/prom.h>
16#include <asm/pbm.h>
17#endif 16#endif
18 17
19/* XXX(hch): this is ugly, but we don't want to pull in exioctl.h */ 18/* XXX(hch): this is ugly, but we don't want to pull in exioctl.h */
@@ -1400,9 +1399,8 @@ static void qla2xxx_nvram_wwn_from_ofw(scsi_qla_host_t *ha, nvram_t *nv)
1400{ 1399{
1401#ifdef CONFIG_SPARC 1400#ifdef CONFIG_SPARC
1402 struct pci_dev *pdev = ha->pdev; 1401 struct pci_dev *pdev = ha->pdev;
1403 struct pcidev_cookie *pcp = pdev->sysdata; 1402 struct device_node *dp = pci_device_to_OF_node(pdev);
1404 struct device_node *dp = pcp->prom_node; 1403 const u8 *val;
1405 u8 *val;
1406 int len; 1404 int len;
1407 1405
1408 val = of_get_property(dp, "port-wwn", &len); 1406 val = of_get_property(dp, "port-wwn", &len);
@@ -3373,9 +3371,8 @@ static void qla24xx_nvram_wwn_from_ofw(scsi_qla_host_t *ha, struct nvram_24xx *n
3373{ 3371{
3374#ifdef CONFIG_SPARC 3372#ifdef CONFIG_SPARC
3375 struct pci_dev *pdev = ha->pdev; 3373 struct pci_dev *pdev = ha->pdev;
3376 struct pcidev_cookie *pcp = pdev->sysdata; 3374 struct device_node *dp = pci_device_to_OF_node(pdev);
3377 struct device_node *dp = pcp->prom_node; 3375 const u8 *val;
3378 u8 *val;
3379 int len; 3376 int len;
3380 3377
3381 val = of_get_property(dp, "port-wwn", &len); 3378 val = of_get_property(dp, "port-wwn", &len);