2017-08-23 17:21:15

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH] i2c: nomadik: constify amba_id

amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/i2c/busses/i2c-nomadik.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index da6609d..49c7c0c 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -1088,7 +1088,7 @@ static struct i2c_vendor_data vendor_db8500 = {
.fifodepth = 32, /* Guessed from TFTR/RFTR = 15 */
};

-static struct amba_id nmk_i2c_ids[] = {
+static const struct amba_id nmk_i2c_ids[] = {
{
.id = 0x00180024,
.mask = 0x00ffffff,
--
2.7.4


2017-08-29 20:35:43

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH] i2c: nomadik: constify amba_id

On Wed, Aug 23, 2017 at 10:50:50PM +0530, Arvind Yadav wrote:
> amba_id are not supposed to change at runtime. All functions
> working with const amba_id. So mark the non-const structs as const.
>
> Signed-off-by: Arvind Yadav <[email protected]>

Applied to for-next, thanks!


Attachments:
(No filename) (287.00 B)
signature.asc (833.00 B)
Download all attachments