diff options
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 @@ | |||
| 16 | #include <asm/mdesc.h> | 16 | #include <asm/mdesc.h> |
| 17 | #include <asm/vio.h> | 17 | #include <asm/vio.h> |
| 18 | 18 | ||
| 19 | static inline int find_in_proplist(const char *list, const char *match, | ||
| 20 | int len) | ||
| 21 | { | ||
| 22 | while (len > 0) { | ||
| 23 | int l; | ||
| 24 | |||
| 25 | if (!strcmp(list, match)) | ||
| 26 | return 1; | ||
| 27 | l = strlen(list) + 1; | ||
| 28 | list += l; | ||
| 29 | len -= l; | ||
| 30 | } | ||
| 31 | return 0; | ||
| 32 | } | ||
| 33 | |||
| 34 | static const struct vio_device_id *vio_match_device( | 19 | static const struct vio_device_id *vio_match_device( |
| 35 | const struct vio_device_id *matches, | 20 | const struct vio_device_id *matches, |
| 36 | const struct vio_dev *dev) | 21 | const struct vio_dev *dev) |
| @@ -49,7 +34,7 @@ static const struct vio_device_id *vio_match_device( | |||
| 49 | 34 | ||
| 50 | if (matches->compat[0]) { | 35 | if (matches->compat[0]) { |
| 51 | match &= len && | 36 | match &= len && |
| 52 | find_in_proplist(compat, matches->compat, len); | 37 | of_find_in_proplist(compat, matches->compat, len); |
| 53 | } | 38 | } |
| 54 | if (match) | 39 | if (match) |
| 55 | return matches; | 40 | return matches; |
| @@ -406,7 +391,7 @@ static int __init vio_init(void) | |||
| 406 | "property\n"); | 391 | "property\n"); |
| 407 | goto out_release; | 392 | goto out_release; |
| 408 | } | 393 | } |
| 409 | if (!find_in_proplist(compat, channel_devices_compat, len)) { | 394 | if (!of_find_in_proplist(compat, channel_devices_compat, len)) { |
| 410 | printk(KERN_ERR "VIO: Channel devices node lacks (%s) " | 395 | printk(KERN_ERR "VIO: Channel devices node lacks (%s) " |
| 411 | "compat entry.\n", channel_devices_compat); | 396 | "compat entry.\n", channel_devices_compat); |
| 412 | goto out_release; | 397 | goto out_release; |
