Skip to content

Commit

Permalink
[QLA2XXX]: Fix build on sparc.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed May 8, 2007
1 parent 28113a9 commit 15576bc
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#ifdef CONFIG_SPARC
#include <asm/prom.h>
#include <asm/pbm.h>
#endif

/* XXX(hch): this is ugly, but we don't want to pull in exioctl.h */
Expand Down Expand Up @@ -1400,9 +1399,8 @@ static void qla2xxx_nvram_wwn_from_ofw(scsi_qla_host_t *ha, nvram_t *nv)
{
#ifdef CONFIG_SPARC
struct pci_dev *pdev = ha->pdev;
struct pcidev_cookie *pcp = pdev->sysdata;
struct device_node *dp = pcp->prom_node;
u8 *val;
struct device_node *dp = pci_device_to_OF_node(pdev);
const u8 *val;
int len;

val = of_get_property(dp, "port-wwn", &len);
Expand Down Expand Up @@ -3373,9 +3371,8 @@ static void qla24xx_nvram_wwn_from_ofw(scsi_qla_host_t *ha, struct nvram_24xx *n
{
#ifdef CONFIG_SPARC
struct pci_dev *pdev = ha->pdev;
struct pcidev_cookie *pcp = pdev->sysdata;
struct device_node *dp = pcp->prom_node;
u8 *val;
struct device_node *dp = pci_device_to_OF_node(pdev);
const u8 *val;
int len;

val = of_get_property(dp, "port-wwn", &len);
Expand Down

0 comments on commit 15576bc

Please sign in to comment.