mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-24 16:11:33 +00:00
spi: spi-uclass: Fix style violations
Remove a superfluous newline, and reduce the scope of a variable. Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@openedev.com> Signed-off-by: Mario Six <mario.six@gdsys.cc>
This commit is contained in:
parent
a3e32c5038
commit
24fc1ec2ee
1 changed files with 2 additions and 3 deletions
|
@ -50,7 +50,6 @@ int dm_spi_claim_bus(struct udevice *dev)
|
||||||
struct dm_spi_bus *spi = dev_get_uclass_priv(bus);
|
struct dm_spi_bus *spi = dev_get_uclass_priv(bus);
|
||||||
struct spi_slave *slave = dev_get_parent_priv(dev);
|
struct spi_slave *slave = dev_get_parent_priv(dev);
|
||||||
int speed;
|
int speed;
|
||||||
int ret;
|
|
||||||
|
|
||||||
speed = slave->max_hz;
|
speed = slave->max_hz;
|
||||||
if (spi->max_hz) {
|
if (spi->max_hz) {
|
||||||
|
@ -62,7 +61,8 @@ int dm_spi_claim_bus(struct udevice *dev)
|
||||||
if (!speed)
|
if (!speed)
|
||||||
speed = 100000;
|
speed = 100000;
|
||||||
if (speed != slave->speed) {
|
if (speed != slave->speed) {
|
||||||
ret = spi_set_speed_mode(bus, speed, slave->mode);
|
int ret = spi_set_speed_mode(bus, speed, slave->mode);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
slave->speed = speed;
|
slave->speed = speed;
|
||||||
|
@ -129,7 +129,6 @@ static int spi_post_probe(struct udevice *bus)
|
||||||
#if defined(CONFIG_NEEDS_MANUAL_RELOC)
|
#if defined(CONFIG_NEEDS_MANUAL_RELOC)
|
||||||
struct dm_spi_ops *ops = spi_get_ops(bus);
|
struct dm_spi_ops *ops = spi_get_ops(bus);
|
||||||
|
|
||||||
|
|
||||||
if (ops->claim_bus)
|
if (ops->claim_bus)
|
||||||
ops->claim_bus += gd->reloc_off;
|
ops->claim_bus += gd->reloc_off;
|
||||||
if (ops->release_bus)
|
if (ops->release_bus)
|
||||||
|
|
Loading…
Add table
Reference in a new issue