diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clk/mvebu/clk-gating-ctrl.c | 2 | ||||
-rw-r--r-- | drivers/dma/mv_xor.c | 9 | ||||
-rw-r--r-- | drivers/pinctrl/mvebu/pinctrl-dove.c | 7 | ||||
-rw-r--r-- | drivers/power/reset/gpio-poweroff.c | 33 | ||||
-rw-r--r-- | drivers/video/mxsfb.c | 3 |
5 files changed, 29 insertions, 25 deletions
diff --git a/drivers/clk/mvebu/clk-gating-ctrl.c b/drivers/clk/mvebu/clk-gating-ctrl.c index c6d3c26..8fa5408 100644 --- a/drivers/clk/mvebu/clk-gating-ctrl.c +++ b/drivers/clk/mvebu/clk-gating-ctrl.c @@ -32,7 +32,7 @@ struct mvebu_soc_descr { #define to_clk_gate(_hw) container_of(_hw, struct clk_gate, hw) -static struct clk __init *mvebu_clk_gating_get_src( +static struct clk *mvebu_clk_gating_get_src( struct of_phandle_args *clkspec, void *data) { struct mvebu_gating_ctrl *ctrl = (struct mvebu_gating_ctrl *)data; diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index ac71f55..e17fad0 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c @@ -1361,13 +1361,16 @@ static int mv_xor_probe(struct platform_device *pdev) err_channel_add: for (i = 0; i < MV_XOR_MAX_CHANNELS; i++) if (xordev->channels[i]) { + mv_xor_channel_remove(xordev->channels[i]); if (pdev->dev.of_node) irq_dispose_mapping(xordev->channels[i]->irq); - mv_xor_channel_remove(xordev->channels[i]); } - clk_disable_unprepare(xordev->clk); - clk_put(xordev->clk); + if (!IS_ERR(xordev->clk)) { + clk_disable_unprepare(xordev->clk); + clk_put(xordev->clk); + } + return ret; } diff --git a/drivers/pinctrl/mvebu/pinctrl-dove.c b/drivers/pinctrl/mvebu/pinctrl-dove.c index 750dea7..69aba36 100644 --- a/drivers/pinctrl/mvebu/pinctrl-dove.c +++ b/drivers/pinctrl/mvebu/pinctrl-dove.c @@ -595,8 +595,11 @@ static int dove_pinctrl_probe(struct platform_device *pdev) * grab clk to make sure it is ticking. */ clk = devm_clk_get(&pdev->dev, NULL); - if (!IS_ERR(clk)) - clk_prepare_enable(clk); + if (IS_ERR(clk)) { + dev_err(&pdev->dev, "Unable to get pdma clock"); + return PTR_RET(clk); + } + clk_prepare_enable(clk); return mvebu_pinctrl_probe(pdev); } diff --git a/drivers/power/reset/gpio-poweroff.c b/drivers/power/reset/gpio-poweroff.c index 0607424..e290d48 100644 --- a/drivers/power/reset/gpio-poweroff.c +++ b/drivers/power/reset/gpio-poweroff.c @@ -29,15 +29,16 @@ static int gpio_active_low; static void gpio_poweroff_do_poweroff(void) { - BUG_ON(gpio_num == -1); + BUG_ON(!gpio_is_valid(gpio_num)); - /* drive it active */ + /* drive it active, also inactive->active edge */ gpio_direction_output(gpio_num, !gpio_active_low); mdelay(100); - /* rising edge or drive inactive */ + /* drive inactive, also active->inactive edge */ gpio_set_value(gpio_num, gpio_active_low); mdelay(100); - /* falling edge */ + + /* drive it active, also inactive->active edge */ gpio_set_value(gpio_num, !gpio_active_low); /* give it some time */ @@ -60,15 +61,12 @@ static int gpio_poweroff_probe(struct platform_device *pdev) } gpio_num = of_get_gpio_flags(pdev->dev.of_node, 0, &flags); - if (gpio_num < 0) { - pr_err("%s: Could not get GPIO configuration: %d", - __func__, gpio_num); - return -ENODEV; - } + if (!gpio_is_valid(gpio_num)) + return gpio_num; + gpio_active_low = flags & OF_GPIO_ACTIVE_LOW; - if (of_get_property(pdev->dev.of_node, "input", NULL)) - input = true; + input = of_property_read_bool(pdev->dev.of_node, "input"); ret = gpio_request(gpio_num, "poweroff-gpio"); if (ret) { @@ -98,8 +96,7 @@ err: static int gpio_poweroff_remove(struct platform_device *pdev) { - if (gpio_num != -1) - gpio_free(gpio_num); + gpio_free(gpio_num); if (pm_power_off == &gpio_poweroff_do_poweroff) pm_power_off = NULL; @@ -115,15 +112,15 @@ static struct platform_driver gpio_poweroff_driver = { .probe = gpio_poweroff_probe, .remove = gpio_poweroff_remove, .driver = { - .name = "poweroff-gpio", - .owner = THIS_MODULE, - .of_match_table = of_gpio_poweroff_match, - }, + .name = "poweroff-gpio", + .owner = THIS_MODULE, + .of_match_table = of_gpio_poweroff_match, + }, }; module_platform_driver(gpio_poweroff_driver); MODULE_AUTHOR("Jamie Lentin <jm@lentin.co.uk>"); MODULE_DESCRIPTION("GPIO poweroff driver"); -MODULE_LICENSE("GPL"); +MODULE_LICENSE("GPL v2"); MODULE_ALIAS("platform:poweroff-gpio"); diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index a45b37c..755556c 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -369,7 +369,8 @@ static void mxsfb_disable_controller(struct fb_info *fb_info) loop--; } - writel(VDCTRL4_SYNC_SIGNALS_ON, host->base + LCDC_VDCTRL4 + REG_CLR); + reg = readl(host->base + LCDC_VDCTRL4); + writel(reg & ~VDCTRL4_SYNC_SIGNALS_ON, host->base + LCDC_VDCTRL4); clk_disable_unprepare(host->clk); |