summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>2022-06-14 09:18:55 +0300
committerWolfram Sang <wsa@kernel.org>2022-06-14 23:09:50 +0300
commite749e4fc900a579720bea9de05174e78f80802b1 (patch)
treedafeaa2d1a4e97f333fb2d951a652a6ce8019665 /drivers/i2c
parent0d91ac577daba6204800bbeadf720a0ae6a30a4a (diff)
downloadlinux-e749e4fc900a579720bea9de05174e78f80802b1.tar.xz
i2c: xiic: Fix the type check for xiic_wakeup
Fix the coverity warning mixed_enum_type: enumerated type mixed with another type We are passing an enum in the xiic_wakeup lets change the function parameters to reflect that. Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Acked-by: Michal Simek <michal.simek@amd.com> [wsa: fixed $subject with proper prefix] Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-xiic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
index 9a1c3f8b7048..b3fe6b2aa3ca 100644
--- a/drivers/i2c/busses/i2c-xiic.c
+++ b/drivers/i2c/busses/i2c-xiic.c
@@ -367,7 +367,7 @@ static void xiic_fill_tx_fifo(struct xiic_i2c *i2c)
}
}
-static void xiic_wakeup(struct xiic_i2c *i2c, int code)
+static void xiic_wakeup(struct xiic_i2c *i2c, enum xilinx_i2c_state code)
{
i2c->tx_msg = NULL;
i2c->rx_msg = NULL;
@@ -383,7 +383,7 @@ static irqreturn_t xiic_process(int irq, void *dev_id)
u32 clr = 0;
int xfer_more = 0;
int wakeup_req = 0;
- int wakeup_code = 0;
+ enum xilinx_i2c_state wakeup_code = STATE_DONE;
int ret;
/* Get the interrupt Status from the IPIF. There is no clearing of