There is no need to cast a "void *" to a different type of pointer. Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> --- drivers/mfd/rsmu_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/rsmu_spi.c b/drivers/mfd/rsmu_spi.c index d2f3d8f1e05af054..2428aaa9aaed9e43 100644 --- a/drivers/mfd/rsmu_spi.c +++ b/drivers/mfd/rsmu_spi.c @@ -129,7 +129,7 @@ static int rsmu_write_page_register(struct rsmu_ddata *rsmu, u16 reg) static int rsmu_reg_read(void *context, unsigned int reg, unsigned int *val) { - struct rsmu_ddata *rsmu = spi_get_drvdata((struct spi_device *)context); + struct rsmu_ddata *rsmu = spi_get_drvdata(context); u8 addr = (u8)(reg & RSMU_LOWER_ADDR_MASK); int err; @@ -146,7 +146,7 @@ static int rsmu_reg_read(void *context, unsigned int reg, unsigned int *val) static int rsmu_reg_write(void *context, unsigned int reg, unsigned int val) { - struct rsmu_ddata *rsmu = spi_get_drvdata((struct spi_device *)context); + struct rsmu_ddata *rsmu = spi_get_drvdata(context); u8 addr = (u8)(reg & RSMU_LOWER_ADDR_MASK); u8 data = (u8)val; int err; -- 2.34.1