Skip to content

Commit 3ec6988

Browse files
marvintwentyfourgregkh
authored andcommitted
staging: nvec: specify a platform-device base id
commit 6e3f62f (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). Reported-by: Misha Komarovskiy <[email protected]> Signed-off-by: Marc Dietrich <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6e49557 commit 3ec6988

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drivers/staging/nvec/nvec.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,23 +85,20 @@ static struct nvec_chip *nvec_power_handle;
8585
static const struct mfd_cell nvec_devices[] = {
8686
{
8787
.name = "nvec-kbd",
88-
.id = 1,
8988
},
9089
{
9190
.name = "nvec-mouse",
92-
.id = 1,
9391
},
9492
{
9593
.name = "nvec-power",
96-
.id = 1,
94+
.id = 0,
9795
},
9896
{
9997
.name = "nvec-power",
100-
.id = 2,
98+
.id = 1,
10199
},
102100
{
103101
.name = "nvec-paz00",
104-
.id = 1,
105102
},
106103
};
107104

@@ -891,7 +888,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
891888
nvec_msg_free(nvec, msg);
892889
}
893890

894-
ret = mfd_add_devices(nvec->dev, -1, nvec_devices,
891+
ret = mfd_add_devices(nvec->dev, 0, nvec_devices,
895892
ARRAY_SIZE(nvec_devices), NULL, 0, NULL);
896893
if (ret)
897894
dev_err(nvec->dev, "error adding subdevices\n");

0 commit comments

Comments
 (0)