]> git.dujemihanovic.xyz Git - u-boot.git/commit
spi: mxc_spi: fix warnings if CLK_ENABLED not set
authorStefano Babic <sbabic@denx.de>
Sat, 10 Jul 2021 14:31:29 +0000 (16:31 +0200)
committerStefano Babic <sbabic@denx.de>
Sat, 10 Jul 2021 16:14:54 +0000 (18:14 +0200)
commit375d7e92980671c868788daf106e66d212faad6a
tree8afee9668af5b251d4e671a8d7489651ae9b946e
parent55d46761a30f779dc82544bdc0de89f4c8c6e4ea
spi: mxc_spi: fix warnings if CLK_ENABLED not set

Following warnings (unused variables) are raised:

drivers/spi/mxc_spi.c: In function 'mxc_spi_probe':
drivers/spi/mxc_spi.c:595:14: error: unused variable 'blob' [-Werror=unused-variable]
595 |  const void *blob = gd->fdt_blob;
    |              ^~~~
drivers/spi/mxc_spi.c:594:6: error: unused variable 'node' [-Werror=unused-variable]
594 |  int node = dev_of_offset(bus);

Move the variable declaration inside the code where they are used.

Signed-off-by: Stefano Babic <sbabic@denx.de>
drivers/spi/mxc_spi.c