Re: [PATCH 2/5] drm/i2c: adv7511: Initial support for adv7533

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 07/28/2015 08:57 AM, Bjorn Andersson wrote:
On Sun 26 Jul 23:16 PDT 2015, Archit Taneja wrote:

From: Lars-Peter Clausen <lars@xxxxxxxxxx>

[..]
diff --git a/drivers/gpu/drm/i2c/adv7511.c b/drivers/gpu/drm/i2c/adv7511.c

[..]


+static const struct of_device_id adv7511_of_ids[] = {
+	{ .compatible = "adi,adv7511", .data = (void *) ADV7511 },
+	{ .compatible = "adi,adv7511w", .data = (void *) ADV7511 },
+	{ .compatible = "adi,adv7513", .data = (void *) ADV7511 },
+	{ .compatible = "adi,adv7533", .data = (void *) ADV7533 },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, adv7511_of_ids);

Please leave this at the bottom.

+
  static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
  {
  	struct adv7511_link_config link_config;
@@ -871,9 +938,22 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
  	adv7511->powered = false;
  	adv7511->status = connector_status_disconnected;

-	ret = adv7511_parse_dt(dev->of_node, &link_config);
-	if (ret)
-		return ret;
+	if (dev->of_node) {
+		const struct of_device_id *of_id;
+
+		of_id = of_match_node(adv7511_of_ids, dev->of_node);

If you use of_device_get_match_data() instead you don't need to move the
of_device_id table.

Thanks, will use this in future revisions.

Archit

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux