diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-08-07 18:46:36 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-08-07 18:46:36 -0700 |
commit | 46bcea7751efc867ae4b073c99ad1d137a475bc0 (patch) | |
tree | 6600d52d5131d2ed1eb95640aa3604aecbcbc4af /arch/sparc64/kernel/vio.c | |
parent | 4a2a4df7b6db25df8f3d5cc6dd0b096119359d92 (diff) | |
download | linux-46bcea7751efc867ae4b073c99ad1d137a475bc0.tar.gz linux-46bcea7751efc867ae4b073c99ad1d137a475bc0.tar.bz2 linux-46bcea7751efc867ae4b073c99ad1d137a475bc0.zip |
[SPARC]: Centralize find_in_proplist() instead of duplicating N times.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/vio.c')
-rw-r--r-- | arch/sparc64/kernel/vio.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/arch/sparc64/kernel/vio.c b/arch/sparc64/kernel/vio.c index 3685daf5157f..1550ac5673da 100644 --- a/arch/sparc64/kernel/vio.c +++ b/arch/sparc64/kernel/vio.c @@ -16,21 +16,6 @@ #include <asm/mdesc.h> #include <asm/vio.h> -static inline int find_in_proplist(const char *list, const char *match, - int len) -{ - while (len > 0) { - int l; - - if (!strcmp(list, match)) - return 1; - l = strlen(list) + 1; - list += l; - len -= l; - } - return 0; -} - static const struct vio_device_id *vio_match_device( const struct vio_device_id *matches, const struct vio_dev *dev) @@ -49,7 +34,7 @@ static const struct vio_device_id *vio_match_device( if (matches->compat[0]) { match &= len && - find_in_proplist(compat, matches->compat, len); + of_find_in_proplist(compat, matches->compat, len); } if (match) return matches; @@ -406,7 +391,7 @@ static int __init vio_init(void) "property\n"); goto out_release; } - if (!find_in_proplist(compat, channel_devices_compat, len)) { + if (!of_find_in_proplist(compat, channel_devices_compat, len)) { printk(KERN_ERR "VIO: Channel devices node lacks (%s) " "compat entry.\n", channel_devices_compat); goto out_release; |