lkml.org 
[lkml]   [2014]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 6/7] OF: spi: Add overlay bus handler
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@konsulko.com>
> ---
> 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;
> + }





\
 
 \ /
  Last update: 2014-03-20 12:21    [W:0.162 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site