mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-26 16:51:48 +00:00
121 lines
4.7 KiB
Diff
121 lines
4.7 KiB
Diff
From fefa6576d7b085c7712fdc2b5af10e61f3fa1841 Mon Sep 17 00:00:00 2001
|
|
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
|
|
Date: Tue, 17 Jan 2017 10:28:52 +0200
|
|
Subject: [PATCH 12/93] drm: bridge: dw-hdmi: Remove unneeded arguments to
|
|
bind/unbind functions
|
|
|
|
The master argument isn't used. The data argument, a void pointer, is
|
|
used by the bind function only where it's cast to a drm_device pointer,
|
|
which can easily be obtained from the encoder argument instead. Remove
|
|
them.
|
|
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
|
|
Reviewed-by: Jose Abreu <joabreu@synopsys.com>
|
|
Signed-off-by: Archit Taneja <architt@codeaurora.org>
|
|
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-3-laurent.pinchart+renesas@ideasonboard.com
|
|
---
|
|
drivers/gpu/drm/bridge/dw-hdmi.c | 8 +++-----
|
|
drivers/gpu/drm/imx/dw_hdmi-imx.c | 4 ++--
|
|
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 4 ++--
|
|
include/drm/bridge/dw_hdmi.h | 5 ++---
|
|
4 files changed, 9 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/drivers/gpu/drm/bridge/dw-hdmi.c b/drivers/gpu/drm/bridge/dw-hdmi.c
|
|
index a668550..f868946 100644
|
|
--- a/drivers/gpu/drm/bridge/dw-hdmi.c
|
|
+++ b/drivers/gpu/drm/bridge/dw-hdmi.c
|
|
@@ -1854,12 +1854,10 @@ static int dw_hdmi_register(struct drm_device *drm, struct dw_hdmi *hdmi)
|
|
return 0;
|
|
}
|
|
|
|
-int dw_hdmi_bind(struct device *dev, struct device *master,
|
|
- void *data, struct drm_encoder *encoder,
|
|
+int dw_hdmi_bind(struct device *dev, struct drm_encoder *encoder,
|
|
struct resource *iores, int irq,
|
|
const struct dw_hdmi_plat_data *plat_data)
|
|
{
|
|
- struct drm_device *drm = data;
|
|
struct device_node *np = dev->of_node;
|
|
struct platform_device_info pdevinfo;
|
|
struct device_node *ddc_node;
|
|
@@ -1992,7 +1990,7 @@ int dw_hdmi_bind(struct device *dev, struct device *master,
|
|
if (ret)
|
|
goto err_iahb;
|
|
|
|
- ret = dw_hdmi_register(drm, hdmi);
|
|
+ ret = dw_hdmi_register(encoder->dev, hdmi);
|
|
if (ret)
|
|
goto err_iahb;
|
|
|
|
@@ -2059,7 +2057,7 @@ int dw_hdmi_bind(struct device *dev, struct device *master,
|
|
}
|
|
EXPORT_SYMBOL_GPL(dw_hdmi_bind);
|
|
|
|
-void dw_hdmi_unbind(struct device *dev, struct device *master, void *data)
|
|
+void dw_hdmi_unbind(struct device *dev)
|
|
{
|
|
struct dw_hdmi *hdmi = dev_get_drvdata(dev);
|
|
|
|
diff --git a/drivers/gpu/drm/imx/dw_hdmi-imx.c b/drivers/gpu/drm/imx/dw_hdmi-imx.c
|
|
index 359cd27..f796658 100644
|
|
--- a/drivers/gpu/drm/imx/dw_hdmi-imx.c
|
|
+++ b/drivers/gpu/drm/imx/dw_hdmi-imx.c
|
|
@@ -249,7 +249,7 @@ static int dw_hdmi_imx_bind(struct device *dev, struct device *master,
|
|
drm_encoder_init(drm, encoder, &dw_hdmi_imx_encoder_funcs,
|
|
DRM_MODE_ENCODER_TMDS, NULL);
|
|
|
|
- ret = dw_hdmi_bind(dev, master, data, encoder, iores, irq, plat_data);
|
|
+ ret = dw_hdmi_bind(dev, encoder, iores, irq, plat_data);
|
|
|
|
/*
|
|
* If dw_hdmi_bind() fails we'll never call dw_hdmi_unbind(),
|
|
@@ -264,7 +264,7 @@ static int dw_hdmi_imx_bind(struct device *dev, struct device *master,
|
|
static void dw_hdmi_imx_unbind(struct device *dev, struct device *master,
|
|
void *data)
|
|
{
|
|
- return dw_hdmi_unbind(dev, master, data);
|
|
+ return dw_hdmi_unbind(dev);
|
|
}
|
|
|
|
static const struct component_ops dw_hdmi_imx_ops = {
|
|
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
|
index 0665fb9..e8fb5c5 100644
|
|
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
|
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
|
@@ -301,7 +301,7 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,
|
|
drm_encoder_init(drm, encoder, &dw_hdmi_rockchip_encoder_funcs,
|
|
DRM_MODE_ENCODER_TMDS, NULL);
|
|
|
|
- ret = dw_hdmi_bind(dev, master, data, encoder, iores, irq, plat_data);
|
|
+ ret = dw_hdmi_bind(dev, encoder, iores, irq, plat_data);
|
|
|
|
/*
|
|
* If dw_hdmi_bind() fails we'll never call dw_hdmi_unbind(),
|
|
@@ -316,7 +316,7 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,
|
|
static void dw_hdmi_rockchip_unbind(struct device *dev, struct device *master,
|
|
void *data)
|
|
{
|
|
- return dw_hdmi_unbind(dev, master, data);
|
|
+ return dw_hdmi_unbind(dev);
|
|
}
|
|
|
|
static const struct component_ops dw_hdmi_rockchip_ops = {
|
|
diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h
|
|
index bae79f3..11edda6 100644
|
|
--- a/include/drm/bridge/dw_hdmi.h
|
|
+++ b/include/drm/bridge/dw_hdmi.h
|
|
@@ -56,9 +56,8 @@ struct dw_hdmi_plat_data {
|
|
struct drm_display_mode *mode);
|
|
};
|
|
|
|
-void dw_hdmi_unbind(struct device *dev, struct device *master, void *data);
|
|
-int dw_hdmi_bind(struct device *dev, struct device *master,
|
|
- void *data, struct drm_encoder *encoder,
|
|
+void dw_hdmi_unbind(struct device *dev);
|
|
+int dw_hdmi_bind(struct device *dev, struct drm_encoder *encoder,
|
|
struct resource *iores, int irq,
|
|
const struct dw_hdmi_plat_data *plat_data);
|
|
|
|
--
|
|
1.9.1
|
|
|