dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jitendra Sharma <shajit@codeaurora.org>
To: laurent.pinchart@ideasonboard.com
Cc: Jitendra Sharma <shajit@codeaurora.org>, dri-devel@lists.freedesktop.org
Subject: [PATCH] drm/bridge: adv7511: Remove unused code blocks
Date: Tue, 18 Oct 2016 15:39:58 +0530	[thread overview]
Message-ID: <1476785398-27255-1-git-send-email-shajit@codeaurora.org> (raw)

Remove unused id_table entries
Currently this driver supports only device tree based configuration.
So, no need in keeping the id_table entries

Remove redundant condition check
Remove not necessary if-else block for checking DT entry because else
part will never be picked as in absence of device node, probe will
fail in initial stage only.

Signed-off-by: Jitendra Sharma <shajit@codeaurora.org>
---
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index 8ed3906..44eea5c 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -942,10 +942,7 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
 	adv7511->powered = false;
 	adv7511->status = connector_status_disconnected;
 
-	if (dev->of_node)
-		adv7511->type = (enum adv7511_type)of_device_get_match_data(dev);
-	else
-		adv7511->type = id->driver_data;
+	adv7511->type = (enum adv7511_type)of_device_get_match_data(dev);
 
 	memset(&link_config, 0, sizeof(link_config));
 
@@ -1065,17 +1062,6 @@ static int adv7511_remove(struct i2c_client *i2c)
 	return 0;
 }
 
-static const struct i2c_device_id adv7511_i2c_ids[] = {
-	{ "adv7511", ADV7511 },
-	{ "adv7511w", ADV7511 },
-	{ "adv7513", ADV7511 },
-#ifdef CONFIG_DRM_I2C_ADV7533
-	{ "adv7533", ADV7533 },
-#endif
-	{ }
-};
-MODULE_DEVICE_TABLE(i2c, adv7511_i2c_ids);
-
 static const struct of_device_id adv7511_of_ids[] = {
 	{ .compatible = "adi,adv7511", .data = (void *)ADV7511 },
 	{ .compatible = "adi,adv7511w", .data = (void *)ADV7511 },
@@ -1096,7 +1082,6 @@ static int adv7511_remove(struct i2c_client *i2c)
 		.name = "adv7511",
 		.of_match_table = adv7511_of_ids,
 	},
-	.id_table = adv7511_i2c_ids,
 	.probe = adv7511_probe,
 	.remove = adv7511_remove,
 };
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2016-10-18 10:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18 10:09 Jitendra Sharma [this message]
2016-10-18 13:07 ` [PATCH] drm/bridge: adv7511: Remove unused code blocks Laurent Pinchart
2016-10-19  4:34   ` Sharma, Jitendra
2016-10-19 11:42 ` [PATCH v2] " Jitendra Sharma
2016-10-19 11:51   ` Laurent Pinchart
2016-10-19 13:07     ` Sharma, Jitendra
2016-10-19 13:20       ` Archit Taneja
2016-10-19 13:33       ` Laurent Pinchart
2016-10-19 13:41         ` Sharma, Jitendra
2016-10-20  7:35           ` Laurent Pinchart
2016-10-20  8:45             ` Wolfram Sang
2016-10-20  9:26               ` Sharma, Jitendra
2016-10-20  9:34                 ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1476785398-27255-1-git-send-email-shajit@codeaurora.org \
    --to=shajit@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox