* [PATCH 1/4] mfd: max8997: Naturalise cross-architecture discrepancies
@ 2014-01-23 15:05 Lee Jones
2014-01-23 15:05 ` [PATCH 2/4] mfd: max8998: " Lee Jones
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Lee Jones @ 2014-01-23 15:05 UTC (permalink / raw)
To: linux-arm-kernel
If we compile the MAX8997 for a 64bit architecture we receive the following
warnings:
drivers/mfd/max8997.c: In function ?max8997_i2c_get_driver_data?:
drivers/mfd/max8997.c:173:10:
warning: cast from pointer to integer of different size
return (int)match->data;
^
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/max8997.c | 6 +++---
include/linux/mfd/max8997-private.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index be88a3b..5adede0 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -164,15 +164,15 @@ static struct max8997_platform_data *max8997_i2c_parse_dt_pdata(
return pd;
}
-static inline int max8997_i2c_get_driver_data(struct i2c_client *i2c,
+static inline unsigned long max8997_i2c_get_driver_data(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) {
const struct of_device_id *match;
match = of_match_node(max8997_pmic_dt_match, i2c->dev.of_node);
- return (int)match->data;
+ return (unsigned long)match->data;
}
- return (int)id->driver_data;
+ return id->driver_data;
}
static int max8997_i2c_probe(struct i2c_client *i2c,
diff --git a/include/linux/mfd/max8997-private.h b/include/linux/mfd/max8997-private.h
index ad1ae7f..78c76cd 100644
--- a/include/linux/mfd/max8997-private.h
+++ b/include/linux/mfd/max8997-private.h
@@ -387,7 +387,7 @@ struct max8997_dev {
struct i2c_client *muic; /* slave addr 0x4a */
struct mutex iolock;
- int type;
+ unsigned long type;
struct platform_device *battery; /* battery control (not fuel gauge) */
int irq;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/4] mfd: max8998: Naturalise cross-architecture discrepancies
2014-01-23 15:05 [PATCH 1/4] mfd: max8997: Naturalise cross-architecture discrepancies Lee Jones
@ 2014-01-23 15:05 ` Lee Jones
2014-01-23 15:05 ` [PATCH 3/4] mfd: wm8994-core: " Lee Jones
2014-01-23 15:05 ` [PATCH 4/4] mfd: tps65217: " Lee Jones
2 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2014-01-23 15:05 UTC (permalink / raw)
To: linux-arm-kernel
If we compile the MAX8998 for a 64bit architecture we receive the following
warnings:
drivers/mfd/max8998.c: In function ?max8998_i2c_get_driver_data?:
drivers/mfd/max8998.c:178:10:
warning: cast from pointer to integer of different size
return (int)match->data;
^
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/max8998.c | 6 +++---
include/linux/mfd/max8998-private.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c
index f47eaa7..5d5e186 100644
--- a/drivers/mfd/max8998.c
+++ b/drivers/mfd/max8998.c
@@ -169,16 +169,16 @@ static struct max8998_platform_data *max8998_i2c_parse_dt_pdata(
return pd;
}
-static inline int max8998_i2c_get_driver_data(struct i2c_client *i2c,
+static inline unsigned long max8998_i2c_get_driver_data(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) {
const struct of_device_id *match;
match = of_match_node(max8998_dt_match, i2c->dev.of_node);
- return (int)match->data;
+ return (unsigned long)match->data;
}
- return (int)id->driver_data;
+ return id->driver_data;
}
static int max8998_i2c_probe(struct i2c_client *i2c,
diff --git a/include/linux/mfd/max8998-private.h b/include/linux/mfd/max8998-private.h
index 4ecb24b..d68ada5 100644
--- a/include/linux/mfd/max8998-private.h
+++ b/include/linux/mfd/max8998-private.h
@@ -163,7 +163,7 @@ struct max8998_dev {
int ono;
u8 irq_masks_cur[MAX8998_NUM_IRQ_REGS];
u8 irq_masks_cache[MAX8998_NUM_IRQ_REGS];
- int type;
+ unsigned long type;
bool wakeup;
};
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/4] mfd: wm8994-core: Naturalise cross-architecture discrepancies
2014-01-23 15:05 [PATCH 1/4] mfd: max8997: Naturalise cross-architecture discrepancies Lee Jones
2014-01-23 15:05 ` [PATCH 2/4] mfd: max8998: " Lee Jones
@ 2014-01-23 15:05 ` Lee Jones
2014-01-23 15:05 ` [PATCH 4/4] mfd: tps65217: " Lee Jones
2 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2014-01-23 15:05 UTC (permalink / raw)
To: linux-arm-kernel
If we compile the WM8994 for a 64bit architecture we receive the following
warnings:
drivers/mfd/wm8994-core.c: In function ?wm8994_i2c_probe?:
drivers/mfd/wm8994-core.c:639:19:
warning: cast from pointer to integer of different size
wm8994->type = (int)of_id->data;
^
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/wm8994-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index ba04f1b..e6fab94 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -636,7 +636,7 @@ static int wm8994_i2c_probe(struct i2c_client *i2c,
if (i2c->dev.of_node) {
of_id = of_match_device(wm8994_of_match, &i2c->dev);
if (of_id)
- wm8994->type = (int)of_id->data;
+ wm8994->type = (enum wm8994_type)of_id->data;
} else {
wm8994->type = id->driver_data;
}
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 4/4] mfd: tps65217: Naturalise cross-architecture discrepancies
2014-01-23 15:05 [PATCH 1/4] mfd: max8997: Naturalise cross-architecture discrepancies Lee Jones
2014-01-23 15:05 ` [PATCH 2/4] mfd: max8998: " Lee Jones
2014-01-23 15:05 ` [PATCH 3/4] mfd: wm8994-core: " Lee Jones
@ 2014-01-23 15:05 ` Lee Jones
2 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2014-01-23 15:05 UTC (permalink / raw)
To: linux-arm-kernel
If we compile the TPS65217 for a 64bit architecture we receive the following
warnings:
drivers/mfd/tps65217.c: In function ?tps65217_probe?:
drivers/mfd/tps65217.c:173:13:
warning: cast from pointer to integer of different size
chip_id = (unsigned int)match->data;
^
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/tps65217.c | 4 ++--
include/linux/mfd/tps65217.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
index 6939ae5..3cc4c70 100644
--- a/drivers/mfd/tps65217.c
+++ b/drivers/mfd/tps65217.c
@@ -158,7 +158,7 @@ static int tps65217_probe(struct i2c_client *client,
{
struct tps65217 *tps;
unsigned int version;
- unsigned int chip_id = ids->driver_data;
+ unsigned long chip_id = ids->driver_data;
const struct of_device_id *match;
bool status_off = false;
int ret;
@@ -170,7 +170,7 @@ static int tps65217_probe(struct i2c_client *client,
"Failed to find matching dt id\n");
return -EINVAL;
}
- chip_id = (unsigned int)match->data;
+ chip_id = (unsigned long)match->data;
status_off = of_property_read_bool(client->dev.of_node,
"ti,pmic-shutdown-controller");
}
diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h
index a5a7f01..54b5458 100644
--- a/include/linux/mfd/tps65217.h
+++ b/include/linux/mfd/tps65217.h
@@ -252,7 +252,7 @@ struct tps65217_board {
struct tps65217 {
struct device *dev;
struct tps65217_board *pdata;
- unsigned int id;
+ unsigned long id;
struct regulator_desc desc[TPS65217_NUM_REGULATOR];
struct regulator_dev *rdev[TPS65217_NUM_REGULATOR];
struct regmap *regmap;
@@ -263,7 +263,7 @@ static inline struct tps65217 *dev_to_tps65217(struct device *dev)
return dev_get_drvdata(dev);
}
-static inline int tps65217_chip_id(struct tps65217 *tps65217)
+static inline unsigned long tps65217_chip_id(struct tps65217 *tps65217)
{
return tps65217->id;
}
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-23 15:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-23 15:05 [PATCH 1/4] mfd: max8997: Naturalise cross-architecture discrepancies Lee Jones
2014-01-23 15:05 ` [PATCH 2/4] mfd: max8998: " Lee Jones
2014-01-23 15:05 ` [PATCH 3/4] mfd: wm8994-core: " Lee Jones
2014-01-23 15:05 ` [PATCH 4/4] mfd: tps65217: " Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).