leds-powernv.c (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) | leds-powernv.c (99a013c840a05083fd82d220685af7579238bfa8) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * PowerNV LED Driver 4 * 5 * Copyright IBM Corp. 2015 6 * 7 * Author: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> 8 * Author: Anshuman Khandual <khandual@linux.vnet.ibm.com> --- 236 unchanged lines hidden (view full) --- 245{ 246 const char *cur = NULL; 247 int rc = -1; 248 struct property *p; 249 struct device_node *np; 250 struct powernv_led_data *powernv_led; 251 struct device *dev = &pdev->dev; 252 | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * PowerNV LED Driver 4 * 5 * Copyright IBM Corp. 2015 6 * 7 * Author: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> 8 * Author: Anshuman Khandual <khandual@linux.vnet.ibm.com> --- 236 unchanged lines hidden (view full) --- 245{ 246 const char *cur = NULL; 247 int rc = -1; 248 struct property *p; 249 struct device_node *np; 250 struct powernv_led_data *powernv_led; 251 struct device *dev = &pdev->dev; 252 |
253 for_each_child_of_node(led_node, np) { | 253 for_each_available_child_of_node(led_node, np) { |
254 p = of_find_property(np, "led-types", NULL); 255 256 while ((cur = of_prop_next_string(p, cur)) != NULL) { 257 powernv_led = devm_kzalloc(dev, sizeof(*powernv_led), 258 GFP_KERNEL); 259 if (!powernv_led) { 260 of_node_put(np); 261 return -ENOMEM; --- 88 unchanged lines hidden --- | 254 p = of_find_property(np, "led-types", NULL); 255 256 while ((cur = of_prop_next_string(p, cur)) != NULL) { 257 powernv_led = devm_kzalloc(dev, sizeof(*powernv_led), 258 GFP_KERNEL); 259 if (!powernv_led) { 260 of_node_put(np); 261 return -ENOMEM; --- 88 unchanged lines hidden --- |