summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-fsl-lpspi.c
diff options
context:
space:
mode:
authorAlexander Stein <alexander.stein@ew.tq-group.com>2023-07-05 12:01:43 +0300
committerMark Brown <broonie@kernel.org>2023-07-17 08:16:07 +0300
commita55265eeedafee12d9743196ce5bb43266509c31 (patch)
tree188f3bc23dff5176cfd0409fcfdd3b8128b00879 /drivers/spi/spi-fsl-lpspi.c
parent749396cb29a7d82cb5e324bf61be3fc948d97141 (diff)
downloadlinux-a55265eeedafee12d9743196ce5bb43266509c31.tar.xz
spi: spi-fsl-lpspi: Remove num_cs from device struct
This is only used during probe() call, so there is no need to store it longer than that. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Link: https://lore.kernel.org/r/20230705090145.1354663-1-alexander.stein@ew.tq-group.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-fsl-lpspi.c')
-rw-r--r--drivers/spi/spi-fsl-lpspi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
index dfdcb69f66ab..0a0677f11a3d 100644
--- a/drivers/spi/spi-fsl-lpspi.c
+++ b/drivers/spi/spi-fsl-lpspi.c
@@ -97,7 +97,6 @@ struct fsl_lpspi_data {
struct clk *clk_ipg;
struct clk *clk_per;
bool is_slave;
- u32 num_cs;
bool is_only_cs1;
bool is_first_byte;
@@ -825,6 +824,7 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
struct spi_controller *controller;
struct resource *res;
int ret, irq;
+ u32 num_cs;
u32 temp;
bool is_slave;
@@ -847,8 +847,8 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
fsl_lpspi->is_only_cs1 = of_property_read_bool((&pdev->dev)->of_node,
"fsl,spi-only-use-cs1-sel");
if (of_property_read_u32((&pdev->dev)->of_node, "num-cs",
- &fsl_lpspi->num_cs))
- fsl_lpspi->num_cs = 1;
+ &num_cs))
+ num_cs = 1;
controller->bits_per_word_mask = SPI_BPW_RANGE_MASK(8, 32);
controller->transfer_one = fsl_lpspi_transfer_one;
@@ -858,7 +858,7 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
controller->flags = SPI_CONTROLLER_MUST_RX | SPI_CONTROLLER_MUST_TX;
controller->dev.of_node = pdev->dev.of_node;
controller->bus_num = pdev->id;
- controller->num_chipselect = fsl_lpspi->num_cs;
+ controller->num_chipselect = num_cs;
controller->slave_abort = fsl_lpspi_slave_abort;
if (!fsl_lpspi->is_slave)
controller->use_gpio_descriptors = true;