Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0209d144 authored by Vivien Didelot's avatar Vivien Didelot Committed by David S. Miller
Browse files

net: dsa: constify probed name



Change the dsa_switch_driver.probe function to return a const char *.

Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent efde611b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -135,9 +135,9 @@ static int bcm_sf2_sw_get_sset_count(struct dsa_switch *ds)
	return BCM_SF2_STATS_SIZE;
}

static char *bcm_sf2_sw_drv_probe(struct device *dsa_dev,
				  struct device *host_dev,
				  int sw_addr, void **_priv)
static const char *bcm_sf2_sw_drv_probe(struct device *dsa_dev,
					struct device *host_dev, int sw_addr,
					void **_priv)
{
	struct bcm_sf2_priv *priv;

+5 −5
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ static int reg_write(struct dsa_switch *ds, int addr, int reg, u16 val)
			return __ret;				\
	})

static char *mv88e6060_get_name(struct mii_bus *bus, int sw_addr)
static const char *mv88e6060_get_name(struct mii_bus *bus, int sw_addr)
{
	int ret;

@@ -69,13 +69,13 @@ static char *mv88e6060_get_name(struct mii_bus *bus, int sw_addr)
	return NULL;
}

static char *mv88e6060_drv_probe(struct device *dsa_dev,
				 struct device *host_dev,
				 int sw_addr, void **_priv)
static const char *mv88e6060_drv_probe(struct device *dsa_dev,
				       struct device *host_dev, int sw_addr,
				       void **_priv)
{
	struct mii_bus *bus = dsa_host_dev_to_mii_bus(host_dev);
	struct mv88e6060_priv *priv;
	char *name;
	const char *name;

	name = mv88e6060_get_name(bus, sw_addr);
	if (name) {
+3 −3
Original line number Diff line number Diff line
@@ -29,9 +29,9 @@ static const struct mv88e6xxx_switch_id mv88e6123_table[] = {
	{ PORT_SWITCH_ID_6165_A2, "Marvell 88e6165 (A2)" },
};

static char *mv88e6123_drv_probe(struct device *dsa_dev,
				 struct device *host_dev,
				 int sw_addr, void **priv)
static const char *mv88e6123_drv_probe(struct device *dsa_dev,
				       struct device *host_dev, int sw_addr,
				       void **priv)
{
	return mv88e6xxx_drv_probe(dsa_dev, host_dev, sw_addr, priv,
				   mv88e6123_table,
+3 −3
Original line number Diff line number Diff line
@@ -25,9 +25,9 @@ static const struct mv88e6xxx_switch_id mv88e6131_table[] = {
	{ PORT_SWITCH_ID_6185, "Marvell 88E6185" },
};

static char *mv88e6131_drv_probe(struct device *dsa_dev,
				 struct device *host_dev,
				 int sw_addr, void **priv)
static const char *mv88e6131_drv_probe(struct device *dsa_dev,
				       struct device *host_dev, int sw_addr,
				       void **priv)
{
	return mv88e6xxx_drv_probe(dsa_dev, host_dev, sw_addr, priv,
				   mv88e6131_table,
+3 −3
Original line number Diff line number Diff line
@@ -24,9 +24,9 @@ static const struct mv88e6xxx_switch_id mv88e6171_table[] = {
	{ PORT_SWITCH_ID_6351, "Marvell 88E6351" },
};

static char *mv88e6171_drv_probe(struct device *dsa_dev,
				 struct device *host_dev,
				 int sw_addr, void **priv)
static const char *mv88e6171_drv_probe(struct device *dsa_dev,
				       struct device *host_dev, int sw_addr,
				       void **priv)
{
	return mv88e6xxx_drv_probe(dsa_dev, host_dev, sw_addr, priv,
				   mv88e6171_table,
Loading