Re: [PATCH 2/3] spi: of: allow instantiating slaves without a driver

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

 



On Thu, Jun 23, 2016 at 05:41:20PM -0000, Michal Suchanek wrote:
> SPI slave devices are not created when looking up driver for the slave
> fails. Create a device anyway so it can be manually bound to a driver.

> @@ -1543,11 +1542,10 @@ of_register_spi_device(struct spi_master *master, struct device_node *nc)
>  	/* Device speed */
>  	rc = of_property_read_u32(nc, "spi-max-frequency", &value);
>  	if (rc) {
> -		dev_err(&master->dev, "%s has no valid 'spi-max-frequency' property (%d)\n",
> +		dev_warn(&master->dev, "%s has no valid 'spi-max-frequency' property (%d)\n",
>  			nc->full_name, rc);
> -		goto err_out;
> -	}
> -	spi->max_speed_hz = value;
> +	} else
> +		spi->max_speed_hz = value;
>  

I can't relate this hunk to the changelog and there's a coding style
problem, if there's { } on one side of an if statement it should be on
both sides.  Why are we making this change?

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux