Skip to content

Commit

Permalink
i2c: aspeed: Add an explicit type casting for *get_clk_reg_val
Browse files Browse the repository at this point in the history
This commit fixes this sparse warning:
drivers/i2c/busses/i2c-aspeed.c:875:38: warning: incorrect type in assignment (different modifiers)
drivers/i2c/busses/i2c-aspeed.c:875:38:    expected unsigned int ( *get_clk_reg_val )( ... )
drivers/i2c/busses/i2c-aspeed.c:875:38:    got void const *const data

Reported-by: Wolfram Sang <[email protected]>
Signed-off-by: Jae Hyun Yoo <[email protected]>
Reviewed-by: Brendan Higgins <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
  • Loading branch information
jaehyoo authored and Wolfram Sang committed Aug 4, 2018
1 parent 2f471d9 commit 5799c4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-aspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ static int aspeed_i2c_probe_bus(struct platform_device *pdev)
if (!match)
bus->get_clk_reg_val = aspeed_i2c_24xx_get_clk_reg_val;
else
bus->get_clk_reg_val = match->data;
bus->get_clk_reg_val = (u32 (*)(u32))match->data;

/* Initialize the I2C adapter */
spin_lock_init(&bus->lock);
Expand Down

0 comments on commit 5799c4b

Please sign in to comment.