From f699fe1e1fa6e53fe52853acea4976aa3303274c Mon Sep 17 00:00:00 2001 From: Stefano Babic Date: Tue, 20 Jul 2010 07:57:07 +0200 Subject: net,fec: Shorten device name as done for other drivers After discussion on the ML it is suggested to drop unrequired and not useful characters from the device name. This patch changes the name for the fec_mxc driver from "FEC_MXC" to "FEC". Signed-off-by: Stefano Babic Signed-off-by: Ben Warren --- drivers/net/fec_mxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net') diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 57f89a3..6b801ce 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -743,7 +743,7 @@ static int fec_probe(bd_t *bd) writel(0x05ee0024, &fec->eth->r_cntrl); /* FIXME 0x05ee0004 */ fec_mii_setspeed(fec); - sprintf(edev->name, "FEC_MXC"); + sprintf(edev->name, "FEC"); miiphy_register(edev->name, fec_miiphy_read, fec_miiphy_write); -- cgit v1.1 From 48690d8024eeeaee3120db702e54fcb238e6d9c7 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Tue, 20 Jul 2010 17:45:02 +0200 Subject: net ppc: fix ethernet device names with spaces since commit 1384f3bb8a4f9066805b70c1418eda78ecb73fdd ethernet names with spaces drop a Warning: eth device name has a space! message. This patch fix it for: - "FEC ETHERNET" devices found on mpc512x, mpc5xxx, mpc8xx and mpc8220 boards. renamed to "FEC". - "SCC ETHERNET" devices found on mpc8xx, mpc82xx based boards. Renamed to "SCC". - "HDLC ETHERNET" devices found on mpc8xx boards Renamed to "HDLC" - "FCC ETHERNET" devices found on mpc8260 and mpc85xx based boards. Renamed to "FCC" Tested on the kup4k board. Signed-off-by: Heiko Schocher Signed-off-by: Ben Warren --- drivers/net/mpc512x_fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net') diff --git a/drivers/net/mpc512x_fec.c b/drivers/net/mpc512x_fec.c index c580c82..6ea4a2b 100644 --- a/drivers/net/mpc512x_fec.c +++ b/drivers/net/mpc512x_fec.c @@ -637,7 +637,7 @@ int mpc512x_fec_initialize (bd_t * bis) dev->send = mpc512x_fec_send; dev->recv = mpc512x_fec_recv; - sprintf (dev->name, "FEC ETHERNET"); + sprintf (dev->name, "FEC"); eth_register (dev); #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) -- cgit v1.1 From 5700bb63522c2af9276f25a15448b61f19d72841 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 27 Jul 2010 18:35:08 -0400 Subject: miiphy: constify device name The driver name does not need to be writable, so constify it. Signed-off-by: Mike Frysinger Signed-off-by: Ben Warren --- drivers/net/4xx_enet.c | 4 ++-- drivers/net/altera_tse.c | 4 ++-- drivers/net/at91_emac.c | 4 ++-- drivers/net/bfin_mac.c | 4 ++-- drivers/net/davinci_emac.c | 4 ++-- drivers/net/designware.c | 4 ++-- drivers/net/eepro100.c | 4 ++-- drivers/net/ep93xx_eth.c | 8 ++++---- drivers/net/fec_mxc.c | 4 ++-- drivers/net/macb.c | 4 ++-- drivers/net/mcfmii.c | 4 ++-- drivers/net/mpc512x_fec.c | 8 ++++---- drivers/net/mpc5xxx_fec.c | 8 ++++---- drivers/net/mvgbe.c | 4 ++-- drivers/net/ns7520_eth.c | 4 ++-- drivers/net/tsec.c | 8 ++++---- 16 files changed, 40 insertions(+), 40 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/4xx_enet.c b/drivers/net/4xx_enet.c index 144b851..d9487ad 100644 --- a/drivers/net/4xx_enet.c +++ b/drivers/net/4xx_enet.c @@ -305,9 +305,9 @@ static void mal_err (struct eth_device *dev, unsigned long isr, static void emac_err (struct eth_device *dev, unsigned long isr); extern int phy_setup_aneg (char *devname, unsigned char addr); -extern int emac4xx_miiphy_read (char *devname, unsigned char addr, +extern int emac4xx_miiphy_read (const char *devname, unsigned char addr, unsigned char reg, unsigned short *value); -extern int emac4xx_miiphy_write (char *devname, unsigned char addr, +extern int emac4xx_miiphy_write (const char *devname, unsigned char addr, unsigned char reg, unsigned short value); int board_emac_count(void); diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c index 5c0c274..d45aab1 100644 --- a/drivers/net/altera_tse.c +++ b/drivers/net/altera_tse.c @@ -426,7 +426,7 @@ static int tse_mdio_write(struct altera_tse_priv *priv, unsigned int regnum, /* MDIO access to phy */ #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) && !defined(BITBANGMII) -static int altera_tse_miiphy_write(char *devname, unsigned char addr, +static int altera_tse_miiphy_write(const char *devname, unsigned char addr, unsigned char reg, unsigned short value) { struct eth_device *dev; @@ -439,7 +439,7 @@ static int altera_tse_miiphy_write(char *devname, unsigned char addr, return 0; } -static int altera_tse_miiphy_read(char *devname, unsigned char addr, +static int altera_tse_miiphy_read(const char *devname, unsigned char addr, unsigned char reg, unsigned short *value) { struct eth_device *dev; diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c index 245da12..0912f52 100644 --- a/drivers/net/at91_emac.c +++ b/drivers/net/at91_emac.c @@ -170,7 +170,7 @@ at91_emac_t *get_emacbase_by_name(char *devname) return (at91_emac_t *) netdev->iobase; } -int at91emac_mii_read(char *devname, unsigned char addr, +int at91emac_mii_read(const char *devname, unsigned char addr, unsigned char reg, unsigned short *value) { at91_emac_t *emac; @@ -181,7 +181,7 @@ int at91emac_mii_read(char *devname, unsigned char addr, } -int at91emac_mii_write(char *devname, unsigned char addr, +int at91emac_mii_write(const char *devname, unsigned char addr, unsigned char reg, unsigned short value) { at91_emac_t *emac; diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index e691bdf..36d4046 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c @@ -71,7 +71,7 @@ static int bfin_miiphy_wait(void) return 0; } -static int bfin_miiphy_read(char *devname, uchar addr, uchar reg, ushort *val) +static int bfin_miiphy_read(const char *devname, uchar addr, uchar reg, ushort *val) { if (bfin_miiphy_wait()) return 1; @@ -82,7 +82,7 @@ static int bfin_miiphy_read(char *devname, uchar addr, uchar reg, ushort *val) return 0; } -static int bfin_miiphy_write(char *devname, uchar addr, uchar reg, ushort val) +static int bfin_miiphy_write(const char *devname, uchar addr, uchar reg, ushort val) { if (bfin_miiphy_wait()) return 1; diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 02bbb8c..41a9910 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -252,12 +252,12 @@ static int gen_auto_negotiate(int phy_addr) #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) -static int davinci_mii_phy_read(char *devname, unsigned char addr, unsigned char reg, unsigned short *value) +static int davinci_mii_phy_read(const char *devname, unsigned char addr, unsigned char reg, unsigned short *value) { return(davinci_eth_phy_read(addr, reg, value) ? 0 : 1); } -static int davinci_mii_phy_write(char *devname, unsigned char addr, unsigned char reg, unsigned short value) +static int davinci_mii_phy_write(const char *devname, unsigned char addr, unsigned char reg, unsigned short value) { return(davinci_eth_phy_write(addr, reg, value) ? 0 : 1); } diff --git a/drivers/net/designware.c b/drivers/net/designware.c index d0d9827..2f923f2 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -451,7 +451,7 @@ static int configure_phy(struct eth_device *dev) } #if defined(CONFIG_MII) -static int dw_mii_read(char *devname, u8 addr, u8 reg, u16 *val) +static int dw_mii_read(const char *devname, u8 addr, u8 reg, u16 *val) { struct eth_device *dev; @@ -462,7 +462,7 @@ static int dw_mii_read(char *devname, u8 addr, u8 reg, u16 *val) return 0; } -static int dw_mii_write(char *devname, u8 addr, u8 reg, u16 val) +static int dw_mii_write(const char *devname, u8 addr, u8 reg, u16 val) { struct eth_device *dev; diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c index 9c06b25..5cb767a 100644 --- a/drivers/net/eepro100.c +++ b/drivers/net/eepro100.c @@ -350,7 +350,7 @@ static struct eth_device* verify_phyaddr (char *devname, unsigned char addr) return dev; } -static int eepro100_miiphy_read (char *devname, unsigned char addr, +static int eepro100_miiphy_read(const char *devname, unsigned char addr, unsigned char reg, unsigned short *value) { struct eth_device *dev; @@ -367,7 +367,7 @@ static int eepro100_miiphy_read (char *devname, unsigned char addr, return 0; } -static int eepro100_miiphy_write (char *devname, unsigned char addr, +static int eepro100_miiphy_write(const char *devname, unsigned char addr, unsigned char reg, unsigned short value) { struct eth_device *dev; diff --git a/drivers/net/ep93xx_eth.c b/drivers/net/ep93xx_eth.c index 4e39948..c09384c 100644 --- a/drivers/net/ep93xx_eth.c +++ b/drivers/net/ep93xx_eth.c @@ -44,9 +44,9 @@ #define GET_REGS(eth_dev) (GET_PRIV(eth_dev)->regs) /* ep93xx_miiphy ops forward declarations */ -static int ep93xx_miiphy_read(char * const dev, unsigned char const addr, +static int ep93xx_miiphy_read(const char * const dev, unsigned char const addr, unsigned char const reg, unsigned short * const value); -static int ep93xx_miiphy_write(char * const dev, unsigned char const addr, +static int ep93xx_miiphy_write(const char * const dev, unsigned char const addr, unsigned char const reg, unsigned short const value); #if defined(EP93XX_MAC_DEBUG) @@ -555,7 +555,7 @@ eth_init_done: /** * Read a 16-bit value from an MII register. */ -static int ep93xx_miiphy_read(char * const dev, unsigned char const addr, +static int ep93xx_miiphy_read(const char * const dev, unsigned char const addr, unsigned char const reg, unsigned short * const value) { struct mac_regs *mac = (struct mac_regs *)MAC_BASE; @@ -607,7 +607,7 @@ static int ep93xx_miiphy_read(char * const dev, unsigned char const addr, /** * Write a 16-bit value to an MII register. */ -static int ep93xx_miiphy_write(char * const dev, unsigned char const addr, +static int ep93xx_miiphy_write(const char * const dev, unsigned char const addr, unsigned char const reg, unsigned short const value) { struct mac_regs *mac = (struct mac_regs *)MAC_BASE; diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 6b801ce..2d4ffed 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -62,7 +62,7 @@ struct fec_priv gfec = { /* * MII-interface related functions */ -static int fec_miiphy_read(char *dev, uint8_t phyAddr, uint8_t regAddr, +static int fec_miiphy_read(const char *dev, uint8_t phyAddr, uint8_t regAddr, uint16_t *retVal) { struct eth_device *edev = eth_get_dev_by_name(dev); @@ -119,7 +119,7 @@ static void fec_mii_setspeed(struct fec_priv *fec) debug("fec_init: mii_speed %#lx\n", fec->eth->mii_speed); } -static int fec_miiphy_write(char *dev, uint8_t phyAddr, uint8_t regAddr, +static int fec_miiphy_write(const char *dev, uint8_t phyAddr, uint8_t regAddr, uint16_t data) { struct eth_device *edev = eth_get_dev_by_name(dev); diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 6a58a37..acb8d20 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -167,7 +167,7 @@ static u16 macb_mdio_read(struct macb_device *macb, u8 reg) #if defined(CONFIG_CMD_MII) -int macb_miiphy_read(char *devname, u8 phy_adr, u8 reg, u16 *value) +int macb_miiphy_read(const char *devname, u8 phy_adr, u8 reg, u16 *value) { struct eth_device *dev = eth_get_dev_by_name(devname); struct macb_device *macb = to_macb(dev); @@ -180,7 +180,7 @@ int macb_miiphy_read(char *devname, u8 phy_adr, u8 reg, u16 *value) return 0; } -int macb_miiphy_write(char *devname, u8 phy_adr, u8 reg, u16 value) +int macb_miiphy_write(const char *devname, u8 phy_adr, u8 reg, u16 value) { struct eth_device *dev = eth_get_dev_by_name(devname); struct macb_device *macb = to_macb(dev); diff --git a/drivers/net/mcfmii.c b/drivers/net/mcfmii.c index 060bdd7..401182d 100644 --- a/drivers/net/mcfmii.c +++ b/drivers/net/mcfmii.c @@ -293,7 +293,7 @@ void __mii_init(void) * Otherwise they hang in mii_send() !!! Sorry! */ -int mcffec_miiphy_read(char *devname, unsigned char addr, unsigned char reg, +int mcffec_miiphy_read(const char *devname, unsigned char addr, unsigned char reg, unsigned short *value) { short rdreg; /* register working value */ @@ -312,7 +312,7 @@ int mcffec_miiphy_read(char *devname, unsigned char addr, unsigned char reg, return 0; } -int mcffec_miiphy_write(char *devname, unsigned char addr, unsigned char reg, +int mcffec_miiphy_write(const char *devname, unsigned char addr, unsigned char reg, unsigned short value) { short rdreg; /* register working value */ diff --git a/drivers/net/mpc512x_fec.c b/drivers/net/mpc512x_fec.c index 6ea4a2b..f56d940 100644 --- a/drivers/net/mpc512x_fec.c +++ b/drivers/net/mpc512x_fec.c @@ -25,8 +25,8 @@ DECLARE_GLOBAL_DATA_PTR; #error "CONFIG_MII has to be defined!" #endif -int fec512x_miiphy_read(char *devname, u8 phyAddr, u8 regAddr, u16 * retVal); -int fec512x_miiphy_write(char *devname, u8 phyAddr, u8 regAddr, u16 data); +int fec512x_miiphy_read(const char *devname, u8 phyAddr, u8 regAddr, u16 * retVal); +int fec512x_miiphy_write(const char *devname, u8 phyAddr, u8 regAddr, u16 data); int mpc512x_fec_init_phy(struct eth_device *dev, bd_t * bis); static uchar rx_buff[FEC_BUFFER_SIZE]; @@ -672,7 +672,7 @@ int mpc512x_fec_initialize (bd_t * bis) /* MII-interface related functions */ /********************************************************************/ -int fec512x_miiphy_read (char *devname, u8 phyAddr, u8 regAddr, u16 * retVal) +int fec512x_miiphy_read(const char *devname, u8 phyAddr, u8 regAddr, u16 *retVal) { volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR; volatile fec512x_t *eth = &im->fec; @@ -719,7 +719,7 @@ int fec512x_miiphy_read (char *devname, u8 phyAddr, u8 regAddr, u16 * retVal) } /********************************************************************/ -int fec512x_miiphy_write (char *devname, u8 phyAddr, u8 regAddr, u16 data) +int fec512x_miiphy_write(const char *devname, u8 phyAddr, u8 regAddr, u16 data) { volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR; volatile fec512x_t *eth = &im->fec; diff --git a/drivers/net/mpc5xxx_fec.c b/drivers/net/mpc5xxx_fec.c index 4a1c8e6..c88e596 100644 --- a/drivers/net/mpc5xxx_fec.c +++ b/drivers/net/mpc5xxx_fec.c @@ -35,8 +35,8 @@ typedef struct { uint8 head[16]; /* MAC header(6 + 6 + 2) + 2(aligned) */ } NBUF; -int fec5xxx_miiphy_read(char *devname, uint8 phyAddr, uint8 regAddr, uint16 * retVal); -int fec5xxx_miiphy_write(char *devname, uint8 phyAddr, uint8 regAddr, uint16 data); +int fec5xxx_miiphy_read(const char *devname, uint8 phyAddr, uint8 regAddr, uint16 *retVal); +int fec5xxx_miiphy_write(const char *devname, uint8 phyAddr, uint8 regAddr, uint16 data); static int mpc5xxx_fec_init_phy(struct eth_device *dev, bd_t * bis); @@ -941,7 +941,7 @@ int mpc5xxx_fec_initialize(bd_t * bis) /* MII-interface related functions */ /********************************************************************/ -int fec5xxx_miiphy_read(char *devname, uint8 phyAddr, uint8 regAddr, uint16 * retVal) +int fec5xxx_miiphy_read(const char *devname, uint8 phyAddr, uint8 regAddr, uint16 * retVal) { ethernet_regs *eth = (ethernet_regs *)MPC5XXX_FEC; uint32 reg; /* convenient holder for the PHY register */ @@ -983,7 +983,7 @@ int fec5xxx_miiphy_read(char *devname, uint8 phyAddr, uint8 regAddr, uint16 * re } /********************************************************************/ -int fec5xxx_miiphy_write(char *devname, uint8 phyAddr, uint8 regAddr, uint16 data) +int fec5xxx_miiphy_write(const char *devname, uint8 phyAddr, uint8 regAddr, uint16 data) { ethernet_regs *eth = (ethernet_regs *)MPC5XXX_FEC; uint32 reg; /* convenient holder for the PHY register */ diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c index cad4023..c701f43 100644 --- a/drivers/net/mvgbe.c +++ b/drivers/net/mvgbe.c @@ -54,7 +54,7 @@ DECLARE_GLOBAL_DATA_PTR; * * Returns 16bit phy register value, or 0xffff on error */ -static int smi_reg_read(char *devname, u8 phy_adr, u8 reg_ofs, u16 * data) +static int smi_reg_read(const char *devname, u8 phy_adr, u8 reg_ofs, u16 * data) { struct eth_device *dev = eth_get_dev_by_name(devname); struct mvgbe_device *dmvgbe = to_mvgbe(dev); @@ -131,7 +131,7 @@ static int smi_reg_read(char *devname, u8 phy_adr, u8 reg_ofs, u16 * data) * Returns 0 if write succeed, -EINVAL on bad parameters * -ETIME on timeout */ -static int smi_reg_write(char *devname, u8 phy_adr, u8 reg_ofs, u16 data) +static int smi_reg_write(const char *devname, u8 phy_adr, u8 reg_ofs, u16 data) { struct eth_device *dev = eth_get_dev_by_name(devname); struct mvgbe_device *dmvgbe = to_mvgbe(dev); diff --git a/drivers/net/ns7520_eth.c b/drivers/net/ns7520_eth.c index c28726e..bfa651b 100644 --- a/drivers/net/ns7520_eth.c +++ b/drivers/net/ns7520_eth.c @@ -761,7 +761,7 @@ enum mii_status { /** * Read a 16-bit value from an MII register. */ -extern int ns7520_miiphy_read(char *devname, unsigned char const addr, +extern int ns7520_miiphy_read(const char *devname, unsigned char const addr, unsigned char const reg, unsigned short *const value) { int ret = MII_STATUS_FAILURE; @@ -807,7 +807,7 @@ extern int ns7520_miiphy_read(char *devname, unsigned char const addr, /** * Write a 16-bit value to an MII register. */ -extern int ns7520_miiphy_write(char *devname, unsigned char const addr, +extern int ns7520_miiphy_write(const char *devname, unsigned char const addr, unsigned char const reg, unsigned short const value) { int ret = MII_STATUS_FAILURE; diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index 54c4a70..9b5dd92 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -60,9 +60,9 @@ static void phy_run_commands(struct tsec_private *priv, struct phy_cmd *cmd); static void adjust_link(struct eth_device *dev); #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \ && !defined(BITBANGMII) -static int tsec_miiphy_write(char *devname, unsigned char addr, +static int tsec_miiphy_write(const char *devname, unsigned char addr, unsigned char reg, unsigned short value); -static int tsec_miiphy_read(char *devname, unsigned char addr, +static int tsec_miiphy_read(const char *devname, unsigned char addr, unsigned char reg, unsigned short *value); #endif #ifdef CONFIG_MCAST_TFTP @@ -1919,7 +1919,7 @@ static void phy_run_commands(struct tsec_private *priv, struct phy_cmd *cmd) * Returns: * 0 on success */ -static int tsec_miiphy_read(char *devname, unsigned char addr, +static int tsec_miiphy_read(const char *devname, unsigned char addr, unsigned char reg, unsigned short *value) { unsigned short ret; @@ -1942,7 +1942,7 @@ static int tsec_miiphy_read(char *devname, unsigned char addr, * Returns: * 0 on success */ -static int tsec_miiphy_write(char *devname, unsigned char addr, +static int tsec_miiphy_write(const char *devname, unsigned char addr, unsigned char reg, unsigned short value) { struct tsec_private *priv = privlist[0]; -- cgit v1.1 From d7fb9bcfb29a1cbdbda7006658e76c2d9da0f66f Mon Sep 17 00:00:00 2001 From: Ben Warren Date: Thu, 29 Jul 2010 12:56:11 -0700 Subject: Fix compile warnings for const correctness Commit 6e37b1a3a25004d3df5867de49fff6b3fc9c4f04 modifies several net calls to take a (const char *) parameter instead of (char *), but in some cases the modified functions call other functions taking (char *). The end result is warnings about discarding the const qualifier. This patch fixes these other function signatures. Signed-off-by: Ben Warren --- drivers/net/at91_emac.c | 2 +- drivers/net/eepro100.c | 3 ++- drivers/net/phy/miiphybb.c | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c index 0912f52..d82459b 100644 --- a/drivers/net/at91_emac.c +++ b/drivers/net/at91_emac.c @@ -162,7 +162,7 @@ int at91emac_write(at91_emac_t *at91mac, unsigned char addr, #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) -at91_emac_t *get_emacbase_by_name(char *devname) +at91_emac_t *get_emacbase_by_name(const char *devname) { struct eth_device *netdev; diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c index 5cb767a..22e14e3 100644 --- a/drivers/net/eepro100.c +++ b/drivers/net/eepro100.c @@ -321,7 +321,8 @@ static int set_phyreg (struct eth_device *dev, unsigned char addr, /* Check if given phyaddr is valid, i.e. there is a PHY connected. * Do this by checking model value field from ID2 register. */ -static struct eth_device* verify_phyaddr (char *devname, unsigned char addr) +static struct eth_device* verify_phyaddr (const char *devname, + unsigned char addr) { struct eth_device *dev; unsigned short value; diff --git a/drivers/net/phy/miiphybb.c b/drivers/net/phy/miiphybb.c index 2768c75..1045cf1 100644 --- a/drivers/net/phy/miiphybb.c +++ b/drivers/net/phy/miiphybb.c @@ -143,7 +143,7 @@ void bb_miiphy_init(void) } } -static inline struct bb_miiphy_bus *bb_miiphy_getbus(char *devname) +static inline struct bb_miiphy_bus *bb_miiphy_getbus(const char *devname) { #ifdef CONFIG_BITBANGMII_MULTI int i; @@ -246,7 +246,7 @@ static void miiphy_pre(struct bb_miiphy_bus *bus, char read, * Returns: * 0 on success */ -int bb_miiphy_read(char *devname, unsigned char addr, +int bb_miiphy_read(const char *devname, unsigned char addr, unsigned char reg, unsigned short *value) { short rdreg; /* register working value */ @@ -327,7 +327,7 @@ int bb_miiphy_read(char *devname, unsigned char addr, * Returns: * 0 on success */ -int bb_miiphy_write (char *devname, unsigned char addr, +int bb_miiphy_write (const char *devname, unsigned char addr, unsigned char reg, unsigned short value) { struct bb_miiphy_bus *bus; -- cgit v1.1