Commit 2e716f5c authored by Markus Elfring's avatar Markus Elfring Committed by Michael Ellerman
Browse files

powerpc/powermac: Use of_property_match_string() in pmac_has_backlight_type()

parent f20b0a03
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -57,18 +57,10 @@ struct backlight_device *pmac_backlight;
int pmac_has_backlight_type(const char *type)
{
	struct device_node* bk_node = of_find_node_by_name(NULL, "backlight");
	int i = of_property_match_string(bk_node, "backlight-control", type);

	if (bk_node) {
		const char *prop = of_get_property(bk_node,
				"backlight-control", NULL);
		if (prop && strncmp(prop, type, strlen(type)) == 0) {
	of_node_put(bk_node);
			return 1;
		}
		of_node_put(bk_node);
	}

	return 0;
	return i >= 0;
}

static void pmac_backlight_key_worker(struct work_struct *work)