mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
OMAP-GPMC: driver updates for v4.9
* Fix potential build failure if CONFIG_OMAP_GPMC is disabled while OMAP_NAND driver is enabled * Trivial fixes which fix build warnings and code check tool warnings (Coccinelle) * Use devm_gpiochip_add_data() -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXw+znAAoJENJaa9O+djCTElkP/jwL3+4EnJNzSizSkDiV7QzX 5ZaorZ9a0vw36AwVVGhty2Hrms+Tfz2uM5baoIfzQqhBjiNtDShli3W/EOqxdZjQ +wchPiaszFLwfai0y2fEeizqssR267rRNiW5U9njcWdFuYmjUXlx/eMnzfhZsUQO A+ij/Ccx+mdw3na64Cs4WJWubbRqMrNiFjXa7BQRJBueeAnmx6yp+l2QYZPTyRT1 jyNMqVrG7SbqnzRGZPCpMCrVik4P2K7/PooD4J5BgvKi87GRm3PrVPfYFRYhPVTY Jxe8tqUTjCY+rhGrST7Dk4WkO6qXmO2YzjTny6CBbfv/Wh0iKjwy4VeeRstvhRO2 2pFsefNyCySnBwvc+DdK73ZrOHD7PChOcl7jkyzT45Q5p3Gk7P8f3x/NLrRi5SM4 N6WgvxSb7+E6WrCvg2EzU87n2puhQbIh4bavwt0RaFUJ8GRRiCy9V4GJHPUaIAAd BWd5WXznUNtW/THSgUXId6OisOy2QGzVGhwifmmfXB3KULN/w8WoGVu8rolVqAj2 SvXmn+OA2Jr2xAzoe8/Gi1xe3z/CLy/1GyljH4OF1wfjgczr1y1ZUqnpIMGLlw3q LLE2RTfb0Bo/E/gSVNI9FftaqhIWNyFflDExUSEqXiTQTxzu1+Ix0rN1A+po0Oir zygXqFX7P/INmOh0KkWK =0DpF -----END PGP SIGNATURE----- Merge tag 'gpmc-omap-for-v4.9' of https://github.com/rogerq/linux into next/drivers Merge "OMAP-GPMC: driver updates for v4.9" from Roger Quadros: * Fix potential build failure if CONFIG_OMAP_GPMC is disabled while OMAP_NAND driver is enabled * Trivial fixes which fix build warnings and code check tool warnings (Coccinelle) * Use devm_gpiochip_add_data() * tag 'gpmc-omap-for-v4.9' of https://github.com/rogerq/linux: memory: omap-gpmc: make gpmc_clk_ticks_to_ns() static memory: omap-gpmc: Fix build with CONFIG_OMAP_GPMC disabled memory: omap-gpmc: use devm_gpiochip_add_data() memory: omap-gpmc: Delete an unnecessary check before the function call "gpiochip_free_own_desc"
This commit is contained in:
commit
2b97f10b38
2 changed files with 7 additions and 17 deletions
|
|
@ -350,8 +350,8 @@ static unsigned int gpmc_ps_to_ticks(unsigned int time_ps)
|
|||
return (time_ps + tick_ps - 1) / tick_ps;
|
||||
}
|
||||
|
||||
unsigned int gpmc_clk_ticks_to_ns(unsigned ticks, int cs,
|
||||
enum gpmc_clk_domain cd)
|
||||
static unsigned int gpmc_clk_ticks_to_ns(unsigned int ticks, int cs,
|
||||
enum gpmc_clk_domain cd)
|
||||
{
|
||||
return ticks * gpmc_get_clk_period(cs, cd) / 1000;
|
||||
}
|
||||
|
|
@ -2143,9 +2143,7 @@ err_child_fail:
|
|||
ret = -ENODEV;
|
||||
|
||||
err_cs:
|
||||
if (waitpin_desc)
|
||||
gpiochip_free_own_desc(waitpin_desc);
|
||||
|
||||
gpiochip_free_own_desc(waitpin_desc);
|
||||
err:
|
||||
gpmc_cs_free(cs);
|
||||
|
||||
|
|
@ -2266,7 +2264,7 @@ static int gpmc_gpio_init(struct gpmc_device *gpmc)
|
|||
gpmc->gpio_chip.get = gpmc_gpio_get;
|
||||
gpmc->gpio_chip.base = -1;
|
||||
|
||||
ret = gpiochip_add(&gpmc->gpio_chip);
|
||||
ret = devm_gpiochip_add_data(gpmc->dev, &gpmc->gpio_chip, NULL);
|
||||
if (ret < 0) {
|
||||
dev_err(gpmc->dev, "could not register gpio chip: %d\n", ret);
|
||||
return ret;
|
||||
|
|
@ -2275,11 +2273,6 @@ static int gpmc_gpio_init(struct gpmc_device *gpmc)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void gpmc_gpio_exit(struct gpmc_device *gpmc)
|
||||
{
|
||||
gpiochip_remove(&gpmc->gpio_chip);
|
||||
}
|
||||
|
||||
static int gpmc_probe(struct platform_device *pdev)
|
||||
{
|
||||
int rc;
|
||||
|
|
@ -2366,7 +2359,7 @@ static int gpmc_probe(struct platform_device *pdev)
|
|||
rc = gpmc_setup_irq(gpmc);
|
||||
if (rc) {
|
||||
dev_err(gpmc->dev, "gpmc_setup_irq failed\n");
|
||||
goto setup_irq_failed;
|
||||
goto gpio_init_failed;
|
||||
}
|
||||
|
||||
rc = gpmc_probe_dt_children(pdev);
|
||||
|
|
@ -2379,8 +2372,6 @@ static int gpmc_probe(struct platform_device *pdev)
|
|||
|
||||
dt_children_failed:
|
||||
gpmc_free_irq(gpmc);
|
||||
setup_irq_failed:
|
||||
gpmc_gpio_exit(gpmc);
|
||||
gpio_init_failed:
|
||||
gpmc_mem_exit();
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
|
|
@ -2394,7 +2385,6 @@ static int gpmc_remove(struct platform_device *pdev)
|
|||
struct gpmc_device *gpmc = platform_get_drvdata(pdev);
|
||||
|
||||
gpmc_free_irq(gpmc);
|
||||
gpmc_gpio_exit(gpmc);
|
||||
gpmc_mem_exit();
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ struct gpmc_nand_regs;
|
|||
struct gpmc_nand_ops *gpmc_omap_get_nand_ops(struct gpmc_nand_regs *regs,
|
||||
int cs);
|
||||
#else
|
||||
static inline gpmc_nand_ops *gpmc_omap_get_nand_ops(struct gpmc_nand_regs *regs,
|
||||
int cs)
|
||||
static inline struct gpmc_nand_ops *gpmc_omap_get_nand_ops(struct gpmc_nand_regs *regs,
|
||||
int cs)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue