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

Commit ccf0dec6 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by David S. Miller
Browse files

[SPARC/64] constify of_get_property return: drivers



The only unfortunate bit here is that the name field of struct map_info
is not const, so for now we put a cast on the assignment of it.

Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6a23acf3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ MODULE_VERSION("2.0");

static LIST_HEAD(device_list);
struct uflash_dev {
	char			*name;	/* device name */
	const char		*name;	/* device name */
	struct map_info 	map;	/* mtd map info */
	struct mtd_info		*mtd;	/* mtd info */
};
@@ -80,7 +80,7 @@ int uflash_devinit(struct linux_ebus_device *edev, struct device_node *dp)

	up->name = of_get_property(dp, "model", NULL);
	if (up->name && 0 < strlen(up->name))
		up->map.name = up->name;
		up->map.name = (char *)up->name;

	up->map.phys = res->start;

+1 −1
Original line number Diff line number Diff line
@@ -2914,7 +2914,7 @@ static int __devinit gem_get_device_address(struct gem *gp)
	int use_idprom = 1;

	if (pcp != NULL) {
		unsigned char *addr;
		const unsigned char *addr;
		int len;

		addr = of_get_property(pcp->prom_node, "local-mac-address",
+3 −3
Original line number Diff line number Diff line
@@ -2704,7 +2704,7 @@ static int __devinit happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe
			dev->dev_addr[i] = macaddr[i];
		macaddr[5]++;
	} else {
		unsigned char *addr;
		const unsigned char *addr;
		int len;

		addr = of_get_property(dp, "local-mac-address", &len);
@@ -3081,7 +3081,7 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev,
		macaddr[5]++;
	} else {
#ifdef CONFIG_SPARC
		unsigned char *addr;
		const unsigned char *addr;
		int len;

		if (qfe_slot != -1 &&
@@ -3300,7 +3300,7 @@ static int __devinit hme_sbus_probe(struct of_device *dev, const struct of_devic
{
	struct sbus_dev *sdev = to_sbus_device(&dev->dev);
	struct device_node *dp = dev->node;
	char *model = of_get_property(dp, "model", NULL);
	const char *model = of_get_property(dp, "model", NULL);
	int is_qfe = (match->data != NULL);

	if (!is_qfe && model && !strcmp(model, "SUNW,sbus-qfe"))
+1 −1
Original line number Diff line number Diff line
@@ -10996,7 +10996,7 @@ static int __devinit tg3_get_macaddr_sparc(struct tg3 *tp)
	struct pcidev_cookie *pcp = pdev->sysdata;

	if (pcp != NULL) {
		unsigned char *addr;
		const unsigned char *addr;
		int len;

		addr = of_get_property(pcp->prom_node, "local-mac-address",
+1 −1
Original line number Diff line number Diff line
@@ -1544,7 +1544,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
		dev->dev_addr[i] = last_phys_addr[i] + 1;
#if defined(__sparc__)
		if (pcp) {
			unsigned char *addr;
			const unsigned char *addr;
			int len;

			addr = of_get_property(pcp->prom_node,
Loading