summaryrefslogtreecommitdiff
path: root/drivers/nfc/pn533/i2c.c
diff options
context:
space:
mode:
authorMichael Thalmeier <michael.thalmeier@hale.at>2016-04-21 17:43:50 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2016-05-10 00:59:18 +0300
commitb16931b13c67f06ca74cc8d02797de480dea348b (patch)
tree11240279a0355fc5f7e485d84fff85a3927d9357 /drivers/nfc/pn533/i2c.c
parent79f09fa79cefdd9df40c9c590cc8dda544ebff26 (diff)
downloadlinux-b16931b13c67f06ca74cc8d02797de480dea348b.tar.xz
NFC: pn533: fix order of initialization
Correctly call nfc_set_parent_dev before nfc_register_device. Otherwise the driver will OOPS when being removed. Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/pn533/i2c.c')
-rw-r--r--drivers/nfc/pn533/i2c.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nfc/pn533/i2c.c b/drivers/nfc/pn533/i2c.c
index 1a622e1c0a73..0141f19ac5a7 100644
--- a/drivers/nfc/pn533/i2c.c
+++ b/drivers/nfc/pn533/i2c.c
@@ -211,7 +211,8 @@ static int pn533_i2c_probe(struct i2c_client *client,
PN533_NO_TYPE_B_PROTOCOLS,
PN533_PROTO_REQ_ACK_RESP,
phy, &i2c_phy_ops, NULL,
- &phy->i2c_dev->dev);
+ &phy->i2c_dev->dev,
+ &client->dev);
if (IS_ERR(priv)) {
r = PTR_ERR(priv);