* [PATCH] hwmon: nct7802: Constify struct regmap_config
@ 2015-01-05 8:57 Krzysztof Kozlowski
2015-01-06 17:53 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2015-01-05 8:57 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, lm-sensors, linux-kernel; +Cc: Krzysztof Kozlowski
The regmap_config struct may be const because it is not modified by the
driver and regmap_init() accepts pointer to const.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/hwmon/nct7802.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/nct7802.c b/drivers/hwmon/nct7802.c
index ec5678289e4a..55765790907b 100644
--- a/drivers/hwmon/nct7802.c
+++ b/drivers/hwmon/nct7802.c
@@ -779,7 +779,7 @@ static bool nct7802_regmap_is_volatile(struct device *dev, unsigned int reg)
return reg != REG_BANK && reg <= 0x20;
}
-static struct regmap_config nct7802_regmap_config = {
+static const struct regmap_config nct7802_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.cache_type = REGCACHE_RBTREE,
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: hwmon: nct7802: Constify struct regmap_config
2015-01-05 8:57 [PATCH] hwmon: nct7802: Constify struct regmap_config Krzysztof Kozlowski
@ 2015-01-06 17:53 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2015-01-06 17:53 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Jean Delvare, lm-sensors, linux-kernel
On Mon, Jan 05, 2015 at 09:57:55AM +0100, Krzysztof Kozlowski wrote:
> The regmap_config struct may be const because it is not modified by the
> driver and regmap_init() accepts pointer to const.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Applied to -next.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-06 17:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-05 8:57 [PATCH] hwmon: nct7802: Constify struct regmap_config Krzysztof Kozlowski
2015-01-06 17:53 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox