summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2019-01-14 13:44:46 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-22 13:34:34 +0100
commit8631f940b81bf0da3d375fce166d381fa8c47bb2 (patch)
treec1289e37b7d4f53da584a31b2ec78fa7312209d8 /drivers
parentdb6e863da1fd91be2c618542986e2a0f67cf62ff (diff)
downloadlinux-8631f940b81bf0da3d375fce166d381fa8c47bb2.tar.bz2
slimbus: core: match full device id
match full slim device id instead of just product and manufacture code, this will allow drivers to be much more specific to that device. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/slimbus/core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c
index 55eda5863a6b..9e4f3b21ba8c 100644
--- a/drivers/slimbus/core.c
+++ b/drivers/slimbus/core.c
@@ -21,7 +21,9 @@ static const struct slim_device_id *slim_match(const struct slim_device_id *id,
{
while (id->manf_id != 0 || id->prod_code != 0) {
if (id->manf_id == sbdev->e_addr.manf_id &&
- id->prod_code == sbdev->e_addr.prod_code)
+ id->prod_code == sbdev->e_addr.prod_code &&
+ id->dev_index == sbdev->e_addr.dev_index &&
+ id->instance == sbdev->e_addr.instance)
return id;
id++;
}