via-pmu-led.c (d1a8df9136ff55e554e11ce65854c282965be8f5) | via-pmu-led.c (018a3d1db7cdb6127656c1622ee1d2302e16436d) |
---|---|
1/* 2 * via-pmu LED class device 3 * 4 * Copyright 2006 Johannes Berg <johannes@sipsolutions.net> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 106 unchanged lines hidden (view full) --- 115 116 /* only do this on keylargo based models */ 117 if (pmu_get_model() != PMU_KEYLARGO_BASED) 118 return -ENODEV; 119 120 dt = of_find_node_by_path("/"); 121 if (dt == NULL) 122 return -ENODEV; | 1/* 2 * via-pmu LED class device 3 * 4 * Copyright 2006 Johannes Berg <johannes@sipsolutions.net> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 106 unchanged lines hidden (view full) --- 115 116 /* only do this on keylargo based models */ 117 if (pmu_get_model() != PMU_KEYLARGO_BASED) 118 return -ENODEV; 119 120 dt = of_find_node_by_path("/"); 121 if (dt == NULL) 122 return -ENODEV; |
123 model = (const char *)get_property(dt, "model", NULL); | 123 model = get_property(dt, "model", NULL); |
124 if (model == NULL) 125 return -ENODEV; 126 if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 && 127 strncmp(model, "iBook", strlen("iBook")) != 0) { 128 of_node_put(dt); 129 /* ignore */ 130 return -ENODEV; 131 } --- 13 unchanged lines hidden --- | 124 if (model == NULL) 125 return -ENODEV; 126 if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 && 127 strncmp(model, "iBook", strlen("iBook")) != 0) { 128 of_node_put(dt); 129 /* ignore */ 130 return -ENODEV; 131 } --- 13 unchanged lines hidden --- |