]> git.karo-electronics.de Git - linux-beck.git/commitdiff
spi: spi-fsl-dspi: constify devtype_data
authorLABBE Corentin <clabbe.montjoie@gmail.com>
Tue, 16 Aug 2016 09:50:20 +0000 (11:50 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 16 Aug 2016 11:26:59 +0000 (12:26 +0100)
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>
drivers/spi/spi-fsl-dspi.c

index 9e9dadb52b3db0bea2f1d23eee12c3479e0dc925..ab6b9e1f79a3a9a62b5ec198b01887717bdec2b1 100644 (file)
@@ -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;
@@ -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;