[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <2443447.AFyh6VXdN9@diego>
Date: Wed, 17 Sep 2014 13:21:48 +0200
From: Heiko Stübner <heiko@...ech.de>
To: broonie@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-rockchip@...ts.infradead.org
Subject: [PATCH] regulator: fan53555: fix wrong cast in probe
The vendor-id gathered from the dt match-data was cast to int but assigned
to an unsigned long, producing warnings on at least sparc, like
drivers/regulator/fan53555.c: In function 'fan53555_regulator_probe':
>> drivers/regulator/fan53555.c:373:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
di->vendor = (int) match->data;
Fix this by using an appropriate cast.
Reported-by: kbuild test robot
Signed-off-by: Heiko Stuebner <heiko@...ech.de>
---
drivers/regulator/fan53555.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
index f2f5535..6ca6e26 100644
--- a/drivers/regulator/fan53555.c
+++ b/drivers/regulator/fan53555.c
@@ -370,7 +370,7 @@ static int fan53555_regulator_probe(struct i2c_client *client,
if (!match)
return -ENODEV;
- di->vendor = (int) match->data;
+ di->vendor = (unsigned long) match->data;
} else {
/* if no ramp constraint set, get the pdata ramp_delay */
if (!di->regulator->constraints.ramp_delay) {
--
2.0.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists