diff options
Diffstat (limited to 'drivers/mfd/ab3100-otp.c')
-rw-r--r-- | drivers/mfd/ab3100-otp.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/mfd/ab3100-otp.c b/drivers/mfd/ab3100-otp.c index 2d14655fdebd..63d2b727ddbb 100644 --- a/drivers/mfd/ab3100-otp.c +++ b/drivers/mfd/ab3100-otp.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/mfd/ab3100.h> | 15 | #include <linux/mfd/abx500.h> |
16 | #include <linux/debugfs.h> | 16 | #include <linux/debugfs.h> |
17 | #include <linux/seq_file.h> | 17 | #include <linux/seq_file.h> |
18 | 18 | ||
@@ -30,7 +30,6 @@ | |||
30 | /** | 30 | /** |
31 | * struct ab3100_otp | 31 | * struct ab3100_otp |
32 | * @dev containing device | 32 | * @dev containing device |
33 | * @ab3100 a pointer to the parent ab3100 device struct | ||
34 | * @locked whether the OTP is locked, after locking, no more bits | 33 | * @locked whether the OTP is locked, after locking, no more bits |
35 | * can be changed but before locking it is still possible | 34 | * can be changed but before locking it is still possible |
36 | * to change bits from 1->0. | 35 | * to change bits from 1->0. |
@@ -49,7 +48,6 @@ | |||
49 | */ | 48 | */ |
50 | struct ab3100_otp { | 49 | struct ab3100_otp { |
51 | struct device *dev; | 50 | struct device *dev; |
52 | struct ab3100 *ab3100; | ||
53 | bool locked; | 51 | bool locked; |
54 | u32 freq; | 52 | u32 freq; |
55 | bool paf; | 53 | bool paf; |
@@ -63,19 +61,19 @@ struct ab3100_otp { | |||
63 | 61 | ||
64 | static int __init ab3100_otp_read(struct ab3100_otp *otp) | 62 | static int __init ab3100_otp_read(struct ab3100_otp *otp) |
65 | { | 63 | { |
66 | struct ab3100 *ab = otp->ab3100; | ||
67 | u8 otpval[8]; | 64 | u8 otpval[8]; |
68 | u8 otpp; | 65 | u8 otpp; |
69 | int err; | 66 | int err; |
70 | 67 | ||
71 | err = ab3100_get_register_interruptible(ab, AB3100_OTPP, &otpp); | 68 | err = abx500_get_register_interruptible(otp->dev, 0, |
69 | AB3100_OTPP, &otpp); | ||
72 | if (err) { | 70 | if (err) { |
73 | dev_err(otp->dev, "unable to read OTPP register\n"); | 71 | dev_err(otp->dev, "unable to read OTPP register\n"); |
74 | return err; | 72 | return err; |
75 | } | 73 | } |
76 | 74 | ||
77 | err = ab3100_get_register_page_interruptible(ab, AB3100_OTP0, | 75 | err = abx500_get_register_page_interruptible(otp->dev, 0, |
78 | otpval, 8); | 76 | AB3100_OTP0, otpval, 8); |
79 | if (err) { | 77 | if (err) { |
80 | dev_err(otp->dev, "unable to read OTP register page\n"); | 78 | dev_err(otp->dev, "unable to read OTP register page\n"); |
81 | return err; | 79 | return err; |
@@ -197,7 +195,6 @@ static int __init ab3100_otp_probe(struct platform_device *pdev) | |||
197 | otp->dev = &pdev->dev; | 195 | otp->dev = &pdev->dev; |
198 | 196 | ||
199 | /* Replace platform data coming in with a local struct */ | 197 | /* Replace platform data coming in with a local struct */ |
200 | otp->ab3100 = platform_get_drvdata(pdev); | ||
201 | platform_set_drvdata(pdev, otp); | 198 | platform_set_drvdata(pdev, otp); |
202 | 199 | ||
203 | err = ab3100_otp_read(otp); | 200 | err = ab3100_otp_read(otp); |