提交 94b968b5 编写于 作者: L LABBE Corentin 提交者: Mark Brown

spi: spi-fsl-dspi: constify devtype_data

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: NLABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 29b4817d
...@@ -159,7 +159,7 @@ struct fsl_dspi { ...@@ -159,7 +159,7 @@ struct fsl_dspi {
u8 cs; u8 cs;
u16 void_write_data; u16 void_write_data;
u32 cs_change; u32 cs_change;
struct fsl_dspi_devtype_data *devtype_data; const struct fsl_dspi_devtype_data *devtype_data;
wait_queue_head_t waitq; wait_queue_head_t waitq;
u32 waitflags; u32 waitflags;
...@@ -686,7 +686,7 @@ static int dspi_probe(struct platform_device *pdev) ...@@ -686,7 +686,7 @@ static int dspi_probe(struct platform_device *pdev)
} }
master->bus_num = bus_num; 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) { if (!dspi->devtype_data) {
dev_err(&pdev->dev, "can't get devtype_data\n"); dev_err(&pdev->dev, "can't get devtype_data\n");
ret = -EFAULT; ret = -EFAULT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册