mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 15:20:41 +00:00
drm/msm: Change nested function to static function
There is currently a nested function in Russel King's tree for the msm HDMI driver. The last nested function was removed from the Linux kernel when the Thinkpad driver was fixed. I believe nested functions are not desired upstream, and it also breaks compilation with clang so here is a patch to change the nested function into static function. The patch works with both clang and gcc. Signed-off-by: Mark Charlebois <charlebm@gmail.com> Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
3afdd8a0e2
commit
fc886107c5
1 changed files with 24 additions and 22 deletions
|
@ -258,14 +258,9 @@ static void set_hdmi_pdev(struct drm_device *dev,
|
||||||
priv->hdmi_pdev = pdev;
|
priv->hdmi_pdev = pdev;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hdmi_bind(struct device *dev, struct device *master, void *data)
|
|
||||||
{
|
|
||||||
static struct hdmi_platform_config config = {};
|
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
struct device_node *of_node = dev->of_node;
|
static int get_gpio(struct device *dev, struct device_node *of_node, const char *name)
|
||||||
|
{
|
||||||
int get_gpio(const char *name)
|
|
||||||
{
|
|
||||||
int gpio = of_get_named_gpio(of_node, name, 0);
|
int gpio = of_get_named_gpio(of_node, name, 0);
|
||||||
if (gpio < 0) {
|
if (gpio < 0) {
|
||||||
char name2[32];
|
char name2[32];
|
||||||
|
@ -278,7 +273,14 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return gpio;
|
return gpio;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static int hdmi_bind(struct device *dev, struct device *master, void *data)
|
||||||
|
{
|
||||||
|
static struct hdmi_platform_config config = {};
|
||||||
|
#ifdef CONFIG_OF
|
||||||
|
struct device_node *of_node = dev->of_node;
|
||||||
|
|
||||||
if (of_device_is_compatible(of_node, "qcom,hdmi-tx-8074")) {
|
if (of_device_is_compatible(of_node, "qcom,hdmi-tx-8074")) {
|
||||||
static const char *hpd_reg_names[] = {"hpd-gdsc", "hpd-5v"};
|
static const char *hpd_reg_names[] = {"hpd-gdsc", "hpd-5v"};
|
||||||
|
@ -312,12 +314,12 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
config.mmio_name = "core_physical";
|
config.mmio_name = "core_physical";
|
||||||
config.ddc_clk_gpio = get_gpio("qcom,hdmi-tx-ddc-clk");
|
config.ddc_clk_gpio = get_gpio(dev, of_node, "qcom,hdmi-tx-ddc-clk");
|
||||||
config.ddc_data_gpio = get_gpio("qcom,hdmi-tx-ddc-data");
|
config.ddc_data_gpio = get_gpio(dev, of_node, "qcom,hdmi-tx-ddc-data");
|
||||||
config.hpd_gpio = get_gpio("qcom,hdmi-tx-hpd");
|
config.hpd_gpio = get_gpio(dev, of_node, "qcom,hdmi-tx-hpd");
|
||||||
config.mux_en_gpio = get_gpio("qcom,hdmi-tx-mux-en");
|
config.mux_en_gpio = get_gpio(dev, of_node, "qcom,hdmi-tx-mux-en");
|
||||||
config.mux_sel_gpio = get_gpio("qcom,hdmi-tx-mux-sel");
|
config.mux_sel_gpio = get_gpio(dev, of_node, "qcom,hdmi-tx-mux-sel");
|
||||||
config.mux_lpm_gpio = get_gpio("qcom,hdmi-tx-mux-lpm");
|
config.mux_lpm_gpio = get_gpio(dev, of_node, "qcom,hdmi-tx-mux-lpm");
|
||||||
|
|
||||||
#else
|
#else
|
||||||
static const char *hpd_clk_names[] = {
|
static const char *hpd_clk_names[] = {
|
||||||
|
|
Loading…
Reference in a new issue