Skip to content

Commit

Permalink
spi: spi-fsl-dspi: constify devtype_data
Browse files Browse the repository at this point in the history
of_id->data is const, so instead of casting the pointer to drop its
const status, this patch constify the devtype_data pointer.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
LABBE Corentin authored and Mark Brown committed Aug 16, 2016
1 parent 29b4817 commit 94b968b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/spi/spi-fsl-dspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ struct fsl_dspi {
u8 cs;
u16 void_write_data;
u32 cs_change;
struct fsl_dspi_devtype_data *devtype_data;
const struct fsl_dspi_devtype_data *devtype_data;

wait_queue_head_t waitq;
u32 waitflags;
Expand Down Expand Up @@ -686,7 +686,7 @@ static int dspi_probe(struct platform_device *pdev)
}
master->bus_num = bus_num;

dspi->devtype_data = (struct fsl_dspi_devtype_data *)of_id->data;
dspi->devtype_data = of_id->data;
if (!dspi->devtype_data) {
dev_err(&pdev->dev, "can't get devtype_data\n");
ret = -EFAULT;
Expand Down

0 comments on commit 94b968b

Please sign in to comment.