diff mbox

[1/5] i2c: ocores: Make of_device_id array const

Message ID 022101cf69d1$f1311200$d3933600$%han@samsung.com
State Superseded
Headers show

Commit Message

Jingoo Han May 7, 2014, 8:54 a.m. UTC
Make of_device_id array const, because all OF functions
handle it as const.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/i2c/busses/i2c-ocores.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Korsgaard May 7, 2014, 9:30 a.m. UTC | #1
>>>>> "Jingoo" == Jingoo Han <jg1.han@samsung.com> writes:

 > Make of_device_id array const, because all OF functions
 > handle it as const.

 > Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Acked-by: Peter Korsgaard <peter@korsgaard.com>


 > ---
 >  drivers/i2c/busses/i2c-ocores.c |    2 +-
 >  1 file changed, 1 insertion(+), 1 deletion(-)

 > diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
 > index 1f6369f..0e10cc6 100644
 > --- a/drivers/i2c/busses/i2c-ocores.c
 > +++ b/drivers/i2c/busses/i2c-ocores.c
 > @@ -250,7 +250,7 @@ static struct i2c_adapter ocores_adapter = {
 >  	.algo		= &ocores_algorithm,
 >  };
 
 > -static struct of_device_id ocores_i2c_match[] = {
 > +static const struct of_device_id ocores_i2c_match[] = {
 >  	{
 >  		.compatible = "opencores,i2c-ocores",
 >  		.data = (void *)TYPE_OCORES,
 > -- 
 > 1.7.10.4


 > --
 > To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
 > the body of a message to majordomo@vger.kernel.org
 > More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang May 14, 2014, 4:38 p.m. UTC | #2
On Wed, May 07, 2014 at 05:54:23PM +0900, Jingoo Han wrote:
> Make of_device_id array const, because all OF functions
> handle it as const.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Ditto, one patch please.
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index 1f6369f..0e10cc6 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -250,7 +250,7 @@  static struct i2c_adapter ocores_adapter = {
 	.algo		= &ocores_algorithm,
 };
 
-static struct of_device_id ocores_i2c_match[] = {
+static const struct of_device_id ocores_i2c_match[] = {
 	{
 		.compatible = "opencores,i2c-ocores",
 		.data = (void *)TYPE_OCORES,