spi: spi-geni-qcom: fix nitpicks
authorAlok Chauhan <alokc@codeaurora.org>
Thu, 25 Oct 2018 16:40:28 +0000 (22:10 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 5 Nov 2018 11:53:43 +0000 (11:53 +0000)
fixed the nitpicks.

Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-geni-qcom.c

index 6432ecc4e2ca9c1ca63a009e8d086f3e9f6ac6e4..d1830fbf2fc6defd2608d89cdc79d33714657d84 100644 (file)
 #define TIMESTAMP_AFTER                BIT(3)
 #define POST_CMD_DELAY         BIT(4)
 
-/* SPI M_COMMAND OPCODE */
-enum spi_mcmd_code {
+enum spi_m_cmd_opcode {
        CMD_NONE,
        CMD_XFER,
        CMD_CS,
        CMD_CANCEL,
 };
 
-
 struct spi_geni_master {
        struct geni_se se;
        struct device *dev;
@@ -87,7 +85,7 @@ struct spi_geni_master {
        struct completion xfer_done;
        unsigned int oversampling;
        spinlock_t lock;
-       unsigned int cur_mcmd;
+       enum spi_m_cmd_opcode cur_mcmd;
        int irq;
 };
 
@@ -129,7 +127,7 @@ static void spi_geni_set_cs(struct spi_device *slv, bool set_flag)
        struct spi_geni_master *mas = spi_master_get_devdata(slv->master);
        struct spi_master *spi = dev_get_drvdata(mas->dev);
        struct geni_se *se = &mas->se;
-       unsigned long timeout;
+       unsigned long time_left;
 
        reinit_completion(&mas->xfer_done);
        pm_runtime_get_sync(mas->dev);
@@ -142,8 +140,8 @@ static void spi_geni_set_cs(struct spi_device *slv, bool set_flag)
        else
                geni_se_setup_m_cmd(se, SPI_CS_DEASSERT, 0);
 
-       timeout = wait_for_completion_timeout(&mas->xfer_done, HZ);
-       if (!timeout)
+       time_left = wait_for_completion_timeout(&mas->xfer_done, HZ);
+       if (!time_left)
                handle_fifo_timeout(spi, NULL);
 
        pm_runtime_put(mas->dev);
@@ -485,7 +483,6 @@ static irqreturn_t geni_spi_isr(int irq, void *data)
        struct geni_se *se = &mas->se;
        u32 m_irq;
        unsigned long flags;
-       irqreturn_t ret = IRQ_HANDLED;
 
        if (mas->cur_mcmd == CMD_NONE)
                return IRQ_NONE;
@@ -533,7 +530,7 @@ static irqreturn_t geni_spi_isr(int irq, void *data)
 
        writel(m_irq, se->base + SE_GENI_M_IRQ_CLEAR);
        spin_unlock_irqrestore(&mas->lock, flags);
-       return ret;
+       return IRQ_HANDLED;
 }
 
 static int spi_geni_probe(struct platform_device *pdev)