From 2b5483ed56f8dbdfcfa70affaad89d51d61529d1 Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Wed, 8 Oct 2008 05:05:29 +0000 Subject: [PATCH] --- yaml --- r: 114602 b: refs/heads/master c: 58f467ce1476f5b2a347cee3a32275b737fbd667 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/of/base.c | 25 +++++-------------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/[refs] b/[refs] index 7d8a0c2fc8ca..0be38e4b49b9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 41c2e949cb7b80c5a6247c7df97759953b0f71b5 +refs/heads/master: 58f467ce1476f5b2a347cee3a32275b737fbd667 diff --git a/trunk/drivers/of/base.c b/trunk/drivers/of/base.c index ad8ac1a8af28..cd1ce7ab8517 100644 --- a/trunk/drivers/of/base.c +++ b/trunk/drivers/of/base.c @@ -420,13 +420,12 @@ static struct of_modalias_table of_modalias_table[] = { * @len: Length of modalias value * * Based on the value of the compatible property, this routine will determine - * an appropriate modalias value for a particular device tree node. Three - * separate methods are used to derive a modalias value. + * an appropriate modalias value for a particular device tree node. Two + * separate methods are attempted to derive a modalias value. * * First method is to lookup the compatible value in of_modalias_table. - * Second is to look for a "linux," entry in the compatible list - * and used that for modalias. Third is to strip off the manufacturer - * prefix from the first compatible entry and use the remainder as modalias + * Second is to strip off the manufacturer prefix from the first + * compatible entry and use the remainder as modalias * * This routine returns 0 on success */ @@ -449,21 +448,7 @@ int of_modalias_node(struct device_node *node, char *modalias, int len) if (!compatible) return -ENODEV; - /* 2. search for linux, entry */ - p = compatible; - while (cplen > 0) { - if (!strncmp(p, "linux,", 6)) { - p += 6; - strlcpy(modalias, p, len); - return 0; - } - - i = strlen(p) + 1; - p += i; - cplen -= i; - } - - /* 3. take first compatible entry and strip manufacturer */ + /* 2. take first compatible entry and strip manufacturer */ p = strchr(compatible, ','); if (!p) return -ENODEV;