Re: [PATCH] rtc: s5m-rtc: Fix info->rtc assignment

From: Krzysztof Kozlowski
Date: Tue Nov 26 2013 - 06:16:42 EST


On 11/26/2013 10:17 AM, Krzysztof Kozlowski wrote:
On 11/15/2013 12:54 PM, Geert Uytterhoeven wrote:
drivers/rtc/rtc-s5m.c: In function âs5m_rtc_probeâ:
drivers/rtc/rtc-s5m.c:545: warning: assignment from incompatible
pointer type

struct s5m_rtc_info.rtc has type "struct regmap *", while
struct sec_pmic_dev.rtc has type "struct i2c_client *".

Probably the author wanted to assign "struct sec_pmic_dev.regmap", which
has the correct type.

Also, as "rtc" doesn't make much sense as a name for a regmap, rename
it to
"regmap".

Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
---
I would be really surprised if this driver didn't just crash...
Please test. Thanks!

drivers/rtc/rtc-s5m.c | 54
++++++++++++++++++++++++-------------------------
1 file changed, 27 insertions(+), 27 deletions(-)

Seems good, tested on device with S5M8767.

Tested-by: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx>

Arrrg, the fix is needed but not sufficient. The chip has different I2C addresses for RTC and PMIC so additional regmap is needed. Currently this rtc-s5m driver does not work. I'll send patches fixing it.

Best regards,
Krzysztof




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/