Skip to content

Commit

Permalink
staging: nvec: specify a platform-device base id
Browse files Browse the repository at this point in the history
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).

Fixes: 6e3f62f
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>
  • Loading branch information
Marc Dietrich authored and Greg Kroah-Hartman committed Jan 25, 2015
1 parent ec6f34e commit 2b7ded0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/staging/nvec/nvec.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,20 @@ static struct nvec_chip *nvec_power_handle;
static const struct mfd_cell nvec_devices[] = {
{
.name = "nvec-kbd",
.id = 1,
},
{
.name = "nvec-mouse",
.id = 1,
},
{
.name = "nvec-power",
.id = 1,
.id = 0,
},
{
.name = "nvec-power",
.id = 2,
.id = 1,
},
{
.name = "nvec-paz00",
.id = 1,
},
};

Expand Down Expand Up @@ -891,7 +888,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
nvec_msg_free(nvec, msg);
}

ret = mfd_add_devices(nvec->dev, -1, nvec_devices,
ret = mfd_add_devices(nvec->dev, 0, nvec_devices,
ARRAY_SIZE(nvec_devices), NULL, 0, NULL);
if (ret)
dev_err(nvec->dev, "error adding subdevices\n");
Expand Down

0 comments on commit 2b7ded0

Please sign in to comment.