lkml.org 
[lkml]   [2017]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 07/15] mux: make device_type const
Date
From: Bhumika Goyal <bhumirks@gmail.com>

Make this const as it is only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Peter Rosin <peda@axentia.se>
---
drivers/mux/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Hi Greg!

Here's a rebased version, handling the mux-core.c -> core.c rename.

Cheers,
Peter

diff --git a/drivers/mux/core.c b/drivers/mux/core.c
index aabfb1549d4e..2260063b0ea8 100644
--- a/drivers/mux/core.c
+++ b/drivers/mux/core.c
@@ -58,7 +58,7 @@ static void mux_chip_release(struct device *dev)
kfree(mux_chip);
}

-static struct device_type mux_type = {
+static const struct device_type mux_type = {
.name = "mux-chip",
.release = mux_chip_release,
};
--
2.11.0
\
 
 \ /
  Last update: 2017-08-29 10:51    [W:0.132 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site