Re: [PATCH v3 6/7] OF: spi: Add overlay bus handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Am 18.03.2014 22:56, schrieb Pantelis Antoniou:
> Add the bus handler registration needed for performing overlays
> containing spi devices.
> 
> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@xxxxxxxxxxxx>
> ---
>  drivers/spi/spi.c | 345 ++++++++++++++++++++++++++++++++++++++----------------
>  1 file changed, 242 insertions(+), 103 deletions(-)
> 

nc is not set in of_register_spi_device and causes an Oops.
Using nc = node works.
What is the purpose of nc?

> +of_register_spi_device(struct spi_master *master, struct device_node *node)
> +{
> +	struct spi_device *spi;
> +	struct device_node *nc;
> +	int err;
> +	u32 value;
> +
> +	/* Alloc an spi_device */
> +	spi = spi_alloc_device(master);
> +	if (!spi) {
> +		dev_err(&master->dev, "spi_device alloc error for %s\n",
> +			nc->full_name);
> +		err = -ENOMEM;
> +		goto err_out;
> +	}
> +
> +	/* Select device driver */
> +	err = of_modalias_node(nc, spi->modalias,
> +				sizeof(spi->modalias));
> +	if (err) {
> +		dev_err(&master->dev, "cannot find modalias for %s\n",
> +			nc->full_name);
> +		goto err_out;
> +	}



--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux