Commit 8b201402 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Lee Jones
Browse files

mfd: da9052: Simplify getting of_device_id match data



Use of_device_get_match_data() to make the code slightly smaller.

Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: default avatarAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent fac61e69
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -155,13 +155,8 @@ static int da9052_i2c_probe(struct i2c_client *client,
		return ret;

#ifdef CONFIG_OF
	if (!id) {
		struct device_node *np = client->dev.of_node;
		const struct of_device_id *deviceid;

		deviceid = of_match_node(dialog_dt_ids, np);
		id = deviceid->data;
	}
	if (!id)
		id = of_device_get_match_data(&client->dev);
#endif

	if (!id) {