]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
of: add const to struct *of_device_id.data
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 7 Jun 2012 10:20:14 +0000 (12:20 +0200)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 24 Jul 2012 06:41:40 +0000 (08:41 +0200)
Drivers should never need to modify the data of a device id. So it can
be const which in turn allows more consts in the driver.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
include/linux/mod_devicetable.h

index 5db93821f9c7d473d1d4fe87f9e3fc5d988044bb..98fb3fef45fc48ac6c8ed9fc6779b1dac789e0cd 100644 (file)
@@ -224,7 +224,7 @@ struct of_device_id
        char    type[32];
        char    compatible[128];
 #ifdef __KERNEL__
-       void    *data;
+       const void *data;
 #else
        kernel_ulong_t data;
 #endif