summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/hdmi
diff options
context:
space:
mode:
authorStephane Viau <sviau@codeaurora.org>2015-06-04 17:31:41 -0400
committerRob Clark <robdclark@gmail.com>2015-06-11 13:11:06 -0400
commit5e4eb82fc23bafa76b0b010f41401eb75db9a851 (patch)
treed88b6f720ab55ffbad6f7a4c8d4661cfe743da16 /drivers/gpu/drm/msm/hdmi
parentfbd4ae8a4eab0a3549f3646c3fb6ddbb414da4b3 (diff)
drm/msm/hdmi: Point to the right struct device
DRM device's dev (hdmi->dev->dev) points to the mdss_mdp device handle. Instead, we should get a reference to the mdss_hdmi handle. Signed-off-by: Stephane Viau <sviau@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/hdmi')
-rw-r--r--drivers/gpu/drm/msm/hdmi/hdmi_connector.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
index b62cdb968614..bf72ad62bf82 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
@@ -29,14 +29,14 @@ struct hdmi_connector {
static int gpio_config(struct hdmi *hdmi, bool on)
{
- struct drm_device *dev = hdmi->dev;
+ struct device *dev = &hdmi->pdev->dev;
const struct hdmi_platform_config *config = hdmi->config;
int ret;
if (on) {
ret = gpio_request(config->ddc_clk_gpio, "HDMI_DDC_CLK");
if (ret) {
- dev_err(dev->dev, "'%s'(%d) gpio_request failed: %d\n",
+ dev_err(dev, "'%s'(%d) gpio_request failed: %d\n",
"HDMI_DDC_CLK", config->ddc_clk_gpio, ret);
goto error1;
}
@@ -44,7 +44,7 @@ static int gpio_config(struct hdmi *hdmi, bool on)
ret = gpio_request(config->ddc_data_gpio, "HDMI_DDC_DATA");
if (ret) {
- dev_err(dev->dev, "'%s'(%d) gpio_request failed: %d\n",
+ dev_err(dev, "'%s'(%d) gpio_request failed: %d\n",
"HDMI_DDC_DATA", config->ddc_data_gpio, ret);
goto error2;
}
@@ -52,7 +52,7 @@ static int gpio_config(struct hdmi *hdmi, bool on)
ret = gpio_request(config->hpd_gpio, "HDMI_HPD");
if (ret) {
- dev_err(dev->dev, "'%s'(%d) gpio_request failed: %d\n",
+ dev_err(dev, "'%s'(%d) gpio_request failed: %d\n",
"HDMI_HPD", config->hpd_gpio, ret);
goto error3;
}
@@ -62,7 +62,7 @@ static int gpio_config(struct hdmi *hdmi, bool on)
if (config->mux_en_gpio != -1) {
ret = gpio_request(config->mux_en_gpio, "HDMI_MUX_EN");
if (ret) {
- dev_err(dev->dev, "'%s'(%d) gpio_request failed: %d\n",
+ dev_err(dev, "'%s'(%d) gpio_request failed: %d\n",
"HDMI_MUX_EN", config->mux_en_gpio, ret);
goto error4;
}
@@ -72,7 +72,7 @@ static int gpio_config(struct hdmi *hdmi, bool on)
if (config->mux_sel_gpio != -1) {
ret = gpio_request(config->mux_sel_gpio, "HDMI_MUX_SEL");
if (ret) {
- dev_err(dev->dev, "'%s'(%d) gpio_request failed: %d\n",
+ dev_err(dev, "'%s'(%d) gpio_request failed: %d\n",
"HDMI_MUX_SEL", config->mux_sel_gpio, ret);
goto error5;
}
@@ -83,7 +83,7 @@ static int gpio_config(struct hdmi *hdmi, bool on)
ret = gpio_request(config->mux_lpm_gpio,
"HDMI_MUX_LPM");
if (ret) {
- dev_err(dev->dev,
+ dev_err(dev,
"'%s'(%d) gpio_request failed: %d\n",
"HDMI_MUX_LPM",
config->mux_lpm_gpio, ret);
@@ -136,7 +136,7 @@ static int hpd_enable(struct hdmi_connector *hdmi_connector)
{
struct hdmi *hdmi = hdmi_connector->hdmi;
const struct hdmi_platform_config *config = hdmi->config;
- struct drm_device *dev = hdmi_connector->base.dev;
+ struct device *dev = &hdmi->pdev->dev;
struct hdmi_phy *phy = hdmi->phy;
uint32_t hpd_ctrl;
int i, ret;
@@ -144,7 +144,7 @@ static int hpd_enable(struct hdmi_connector *hdmi_connector)
for (i = 0; i < config->hpd_reg_cnt; i++) {
ret = regulator_enable(hdmi->hpd_regs[i]);
if (ret) {
- dev_err(dev->dev, "failed to enable hpd regulator: %s (%d)\n",
+ dev_err(dev, "failed to enable hpd regulator: %s (%d)\n",
config->hpd_reg_names[i], ret);
goto fail;
}
@@ -152,7 +152,7 @@ static int hpd_enable(struct hdmi_connector *hdmi_connector)
ret = gpio_config(hdmi, true);
if (ret) {
- dev_err(dev->dev, "failed to configure GPIOs: %d\n", ret);
+ dev_err(dev, "failed to configure GPIOs: %d\n", ret);
goto fail;
}
@@ -161,13 +161,13 @@ static int hpd_enable(struct hdmi_connector *hdmi_connector)
ret = clk_set_rate(hdmi->hpd_clks[i],
config->hpd_freq[i]);
if (ret)
- dev_warn(dev->dev, "failed to set clk %s (%d)\n",
+ dev_warn(dev, "failed to set clk %s (%d)\n",
config->hpd_clk_names[i], ret);
}
ret = clk_prepare_enable(hdmi->hpd_clks[i]);
if (ret) {
- dev_err(dev->dev, "failed to enable hpd clk: %s (%d)\n",
+ dev_err(dev, "failed to enable hpd clk: %s (%d)\n",
config->hpd_clk_names[i], ret);
goto fail;
}
@@ -204,7 +204,7 @@ static void hdp_disable(struct hdmi_connector *hdmi_connector)
{
struct hdmi *hdmi = hdmi_connector->hdmi;
const struct hdmi_platform_config *config = hdmi->config;
- struct drm_device *dev = hdmi_connector->base.dev;
+ struct device *dev = &hdmi->pdev->dev;
int i, ret = 0;
/* Disable HPD interrupt */
@@ -217,12 +217,12 @@ static void hdp_disable(struct hdmi_connector *hdmi_connector)
ret = gpio_config(hdmi, false);
if (ret)
- dev_warn(dev->dev, "failed to unconfigure GPIOs: %d\n", ret);
+ dev_warn(dev, "failed to unconfigure GPIOs: %d\n", ret);
for (i = 0; i < config->hpd_reg_cnt; i++) {
ret = regulator_disable(hdmi->hpd_regs[i]);
if (ret)
- dev_warn(dev->dev, "failed to disable hpd regulator: %s (%d)\n",
+ dev_warn(dev, "failed to disable hpd regulator: %s (%d)\n",
config->hpd_reg_names[i], ret);
}
}
@@ -433,7 +433,7 @@ struct drm_connector *hdmi_connector_init(struct hdmi *hdmi)
ret = hpd_enable(hdmi_connector);
if (ret) {
- dev_err(hdmi->dev->dev, "failed to enable HPD: %d\n", ret);
+ dev_err(&hdmi->pdev->dev, "failed to enable HPD: %d\n", ret);
goto fail;
}