]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
i2c/i2c-omap: add a const qualifier
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 21 May 2012 19:57:39 +0000 (21:57 +0200)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 24 Jul 2012 06:41:25 +0000 (08:41 +0200)
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:

drivers/i2c/busses/i2c-omap.c: In function 'omap_i2c_probe':
drivers/i2c/busses/i2c-omap.c:1025: warning: assignment discards qualifiers from pointer target type

Reviewed-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
drivers/i2c/busses/i2c-omap.c

index 801df6000e9b2042ce6bc6453b38e49bf41fd031..4fc585dfcc444c7a934ef001d8d852b3d5ecc43f 100644 (file)
@@ -987,7 +987,8 @@ omap_i2c_probe(struct platform_device *pdev)
        struct omap_i2c_dev     *dev;
        struct i2c_adapter      *adap;
        struct resource         *mem, *irq, *ioarea;
-       struct omap_i2c_bus_platform_data *pdata = pdev->dev.platform_data;
+       const struct omap_i2c_bus_platform_data *pdata =
+               pdev->dev.platform_data;
        struct device_node      *node = pdev->dev.of_node;
        const struct of_device_id *match;
        irq_handler_t isr;