aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses
diff options
context:
space:
mode:
authorVasily Khoruzhick <anarsoul@gmail.com>2015-05-03 14:13:10 -0400
committerWolfram Sang <wsa@the-dreams.de>2015-05-12 12:13:46 -0400
commit8d487a43c36b54a029d74ad3b0a6a9d1253e728a (patch)
tree34800d03a117a80f25705aa69d6fb9e41076ce4a /drivers/i2c/busses
parent3e59ae4aa28237ced95413fbd46004b57c4da095 (diff)
i2c: s3c2410: fix oops in suspend callback for non-dt platforms
Initialize sysreg by default, otherwise driver will crash in suspend callback when not using DT. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org Fixes: a7750c3ef01223 ("i2c: s3c2410: Handle i2c sys_cfg register in i2c driver")
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r--drivers/i2c/busses/i2c-s3c2410.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 958c8db4ec30..297e9c9ac943 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1143,6 +1143,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
1143 return -ENOMEM; 1143 return -ENOMEM;
1144 1144
1145 i2c->quirks = s3c24xx_get_device_quirks(pdev); 1145 i2c->quirks = s3c24xx_get_device_quirks(pdev);
1146 i2c->sysreg = ERR_PTR(-ENOENT);
1146 if (pdata) 1147 if (pdata)
1147 memcpy(i2c->pdata, pdata, sizeof(*pdata)); 1148 memcpy(i2c->pdata, pdata, sizeof(*pdata));
1148 else 1149 else