diff options
author | Marc Dietrich <marvin24@gmx.de> | 2015-01-20 17:01:28 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-25 06:04:31 -0500 |
commit | 2b7ded0fb63ef7ce63d25aef4114a0ad629a9e60 (patch) | |
tree | d47c515f79c255e8adb30b7d83ecf007c0af7a72 | |
parent | ec6f34e5b552fb0a52e6aae1a5afbbb1605cc6cc (diff) |
staging: nvec: specify a platform-device base id
commit 6e3f62f079 (mfd: core: Fix platform-device id generation) modified
the computation of the mfd cell id. Negative numbers forbit the specification
of cell ids as we do. Fix this for now by specifying a base of 0 instead. In
the long run, this may be changed to automatic cell ids (base -2).
Fixes: 6e3f62f079
Reported-by: Misha Komarovskiy <zombah@gmail.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/nvec/nvec.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 093535c6217b..120b70d72d79 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c | |||
@@ -85,23 +85,20 @@ static struct nvec_chip *nvec_power_handle; | |||
85 | static const struct mfd_cell nvec_devices[] = { | 85 | static const struct mfd_cell nvec_devices[] = { |
86 | { | 86 | { |
87 | .name = "nvec-kbd", | 87 | .name = "nvec-kbd", |
88 | .id = 1, | ||
89 | }, | 88 | }, |
90 | { | 89 | { |
91 | .name = "nvec-mouse", | 90 | .name = "nvec-mouse", |
92 | .id = 1, | ||
93 | }, | 91 | }, |
94 | { | 92 | { |
95 | .name = "nvec-power", | 93 | .name = "nvec-power", |
96 | .id = 1, | 94 | .id = 0, |
97 | }, | 95 | }, |
98 | { | 96 | { |
99 | .name = "nvec-power", | 97 | .name = "nvec-power", |
100 | .id = 2, | 98 | .id = 1, |
101 | }, | 99 | }, |
102 | { | 100 | { |
103 | .name = "nvec-paz00", | 101 | .name = "nvec-paz00", |
104 | .id = 1, | ||
105 | }, | 102 | }, |
106 | }; | 103 | }; |
107 | 104 | ||
@@ -891,7 +888,7 @@ static int tegra_nvec_probe(struct platform_device *pdev) | |||
891 | nvec_msg_free(nvec, msg); | 888 | nvec_msg_free(nvec, msg); |
892 | } | 889 | } |
893 | 890 | ||
894 | ret = mfd_add_devices(nvec->dev, -1, nvec_devices, | 891 | ret = mfd_add_devices(nvec->dev, 0, nvec_devices, |
895 | ARRAY_SIZE(nvec_devices), NULL, 0, NULL); | 892 | ARRAY_SIZE(nvec_devices), NULL, 0, NULL); |
896 | if (ret) | 893 | if (ret) |
897 | dev_err(nvec->dev, "error adding subdevices\n"); | 894 | dev_err(nvec->dev, "error adding subdevices\n"); |