diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2006-07-12 01:41:03 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-31 01:55:05 -0400 |
commit | 1a2509c946bfd4d4a4c5a6e816082d3a7de45db8 (patch) | |
tree | 1a99101fe9be656b928272925102c602e6650562 /drivers/net/spider_net.c | |
parent | 294ef16a2ee34d0d94aa63616f7552d3bc66c982 (diff) |
[POWERPC] netdevices: Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.
powerpc-specific network device driver changes.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/net/spider_net.c')
-rw-r--r-- | drivers/net/spider_net.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index fb1d5a8a45cf..b30290d53f79 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -1812,10 +1812,10 @@ spider_net_setup_phy(struct spider_net_card *card) | |||
1812 | */ | 1812 | */ |
1813 | static int | 1813 | static int |
1814 | spider_net_download_firmware(struct spider_net_card *card, | 1814 | spider_net_download_firmware(struct spider_net_card *card, |
1815 | u8 *firmware_ptr) | 1815 | const void *firmware_ptr) |
1816 | { | 1816 | { |
1817 | int sequencer, i; | 1817 | int sequencer, i; |
1818 | u32 *fw_ptr = (u32 *)firmware_ptr; | 1818 | const u32 *fw_ptr = firmware_ptr; |
1819 | 1819 | ||
1820 | /* stop sequencers */ | 1820 | /* stop sequencers */ |
1821 | spider_net_write_reg(card, SPIDER_NET_GSINIT, | 1821 | spider_net_write_reg(card, SPIDER_NET_GSINIT, |
@@ -1872,7 +1872,7 @@ spider_net_init_firmware(struct spider_net_card *card) | |||
1872 | { | 1872 | { |
1873 | struct firmware *firmware = NULL; | 1873 | struct firmware *firmware = NULL; |
1874 | struct device_node *dn; | 1874 | struct device_node *dn; |
1875 | u8 *fw_prop = NULL; | 1875 | const u8 *fw_prop = NULL; |
1876 | int err = -ENOENT; | 1876 | int err = -ENOENT; |
1877 | int fw_size; | 1877 | int fw_size; |
1878 | 1878 | ||
@@ -1898,7 +1898,7 @@ try_host_fw: | |||
1898 | if (!dn) | 1898 | if (!dn) |
1899 | goto out_err; | 1899 | goto out_err; |
1900 | 1900 | ||
1901 | fw_prop = (u8 *)get_property(dn, "firmware", &fw_size); | 1901 | fw_prop = get_property(dn, "firmware", &fw_size); |
1902 | if (!fw_prop) | 1902 | if (!fw_prop) |
1903 | goto out_err; | 1903 | goto out_err; |
1904 | 1904 | ||
@@ -2058,7 +2058,7 @@ spider_net_setup_netdev(struct spider_net_card *card) | |||
2058 | struct net_device *netdev = card->netdev; | 2058 | struct net_device *netdev = card->netdev; |
2059 | struct device_node *dn; | 2059 | struct device_node *dn; |
2060 | struct sockaddr addr; | 2060 | struct sockaddr addr; |
2061 | u8 *mac; | 2061 | const u8 *mac; |
2062 | 2062 | ||
2063 | SET_MODULE_OWNER(netdev); | 2063 | SET_MODULE_OWNER(netdev); |
2064 | SET_NETDEV_DEV(netdev, &card->pdev->dev); | 2064 | SET_NETDEV_DEV(netdev, &card->pdev->dev); |
@@ -2089,7 +2089,7 @@ spider_net_setup_netdev(struct spider_net_card *card) | |||
2089 | if (!dn) | 2089 | if (!dn) |
2090 | return -EIO; | 2090 | return -EIO; |
2091 | 2091 | ||
2092 | mac = (u8 *)get_property(dn, "local-mac-address", NULL); | 2092 | mac = get_property(dn, "local-mac-address", NULL); |
2093 | if (!mac) | 2093 | if (!mac) |
2094 | return -EIO; | 2094 | return -EIO; |
2095 | memcpy(addr.sa_data, mac, ETH_ALEN); | 2095 | memcpy(addr.sa_data, mac, ETH_ALEN); |