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

Commit 9d15a3ba authored by Anatolij Gustschin's avatar Anatolij Gustschin Committed by Grant Likely
Browse files

spi/mpc512x-psc: don't use obsolet cell-index property



Remove deprecated cell-index property and use spi alias to
obtain the SPI PSC number used for SPI bus id.

Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 2deff8d6
Loading
Loading
Loading
Loading
+5 −11
Original line number Diff line number Diff line
@@ -522,17 +522,11 @@ static int mpc512x_psc_spi_of_probe(struct platform_device *op)
	regaddr64 = of_translate_address(op->dev.of_node, regaddr_p);

	/* get PSC id (0..11, used by port_config) */
	if (op->dev.platform_data == NULL) {
		const u32 *psc_nump;

		psc_nump = of_get_property(op->dev.of_node, "cell-index", NULL);
		if (!psc_nump || *psc_nump > 11) {
			dev_err(&op->dev, "mpc512x_psc_spi: Device node %s "
				"has invalid cell-index property\n",
	id = of_alias_get_id(op->dev.of_node, "spi");
	if (id < 0) {
		dev_err(&op->dev, "no alias id for %s\n",
			op->dev.of_node->full_name);
			return -EINVAL;
		}
		id = *psc_nump;
		return id;
	}

	return mpc512x_psc_spi_do_probe(&op->dev, (u32) regaddr64, (u32) size64,