diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/driver.c | 3 | ||||
-rw-r--r-- | drivers/mtd/mtdconcat.c | 4 | ||||
-rw-r--r-- | drivers/mtd/nor/cfi_flash.c | 23 | ||||
-rw-r--r-- | drivers/net/enc28j60.c | 2 | ||||
-rw-r--r-- | drivers/pinctrl/imx-iomux-v2.c | 6 | ||||
-rw-r--r-- | drivers/video/Kconfig | 2 |
6 files changed, 26 insertions, 14 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c index 338bea1280..943deb489c 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -459,7 +459,7 @@ const char *dev_id(const struct device_d *dev) return buf; } -void devices_shutdown(void) +static void devices_shutdown(void) { struct device_d *dev; @@ -468,6 +468,7 @@ void devices_shutdown(void) dev->bus->remove(dev); } } +devshutdown_exitcall(devices_shutdown); int dev_get_drvdata(struct device_d *dev, const void **data) { diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index 10d3dc4c36..837614fdc5 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c @@ -66,6 +66,8 @@ concat_read(struct mtd_info *mtd, loff_t from, size_t len, int ret = 0, err; int i; + *retlen = 0; + for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; size_t size, retsize; @@ -118,6 +120,8 @@ concat_write(struct mtd_info *mtd, loff_t to, size_t len, int err = -EINVAL; int i; + *retlen = 0; + for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; size_t size, retsize; diff --git a/drivers/mtd/nor/cfi_flash.c b/drivers/mtd/nor/cfi_flash.c index f2268dfde7..feffbd04ac 100644 --- a/drivers/mtd/nor/cfi_flash.c +++ b/drivers/mtd/nor/cfi_flash.c @@ -71,6 +71,11 @@ static unsigned int flash_offset_cfi[2] = { #define CFG_FLASH_CFI_WIDTH FLASH_CFI_8BIT #endif +struct cfi_priv { + struct flash_info *infos; + int num_devs; + struct mtd_info **mtds; +}; /* * Functions @@ -668,9 +673,8 @@ static int cfi_mtd_unlock(struct mtd_info *mtd, loff_t offset, size_t len) return cfi_mtd_protect(finfo, offset, len, 0); } -static void cfi_info (struct device_d* dev) +static void cfi_info_one(struct flash_info *info) { - struct flash_info *info = (struct flash_info *)dev->priv; int i; if (info->flash_id != FLASH_MAN_CFI) { @@ -761,6 +765,15 @@ static void cfi_info (struct device_d* dev) return; } +static void cfi_info(struct device_d *dev) +{ + struct cfi_priv *priv = dev->priv; + int i; + + for (i = 0; i < priv->num_devs; i++) + cfi_info_one(&priv->infos[i]); +} + int flash_status_check(struct flash_info *info, flash_sect_t sector, u64 tout, char *prompt) { @@ -921,12 +934,6 @@ static int cfi_mtd_erase(struct mtd_info *mtd, struct erase_info *instr) return 0; } -struct cfi_priv { - struct flash_info *infos; - int num_devs; - struct mtd_info **mtds; -}; - static void cfi_init_mtd(struct flash_info *info) { struct mtd_info *mtd = &info->mtd; diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c index 76b3df63f6..6550c59fc8 100644 --- a/drivers/net/enc28j60.c +++ b/drivers/net/enc28j60.c @@ -422,7 +422,7 @@ static int enc28j60_get_ethaddr(struct eth_device *edev, unsigned char *m) * Program the hardware MAC address from dev->dev_addr. */ static int enc28j60_set_ethaddr(struct eth_device *edev, - unsigned char *mac_addr) + const unsigned char *mac_addr) { int ret; struct enc28j60_net *priv = edev->priv; diff --git a/drivers/pinctrl/imx-iomux-v2.c b/drivers/pinctrl/imx-iomux-v2.c index 2622d9a2d6..1e0e8e9fd6 100644 --- a/drivers/pinctrl/imx-iomux-v2.c +++ b/drivers/pinctrl/imx-iomux-v2.c @@ -58,7 +58,7 @@ int imx_iomux_mode(unsigned int pin_mode) return ret; } -EXPORT_SYMBOL(mxc_iomux_mode); +EXPORT_SYMBOL(imx_iomux_mode); /* * This function configures the pad value for a IOMUX pin. @@ -83,7 +83,7 @@ void imx_iomux_set_pad(enum iomux_pins pin, u32 config) l |= config << (field * 10); writel(l, reg); } -EXPORT_SYMBOL(mxc_iomux_set_pad); +EXPORT_SYMBOL(imx_iomux_set_pad); /* * This function enables/disables the general purpose function for a particular @@ -104,7 +104,7 @@ void imx_iomux_set_gpr(enum iomux_gp_func gp, bool en) writel(l, base + IOMUXGPR); } -EXPORT_SYMBOL(mxc_iomux_set_gpr); +EXPORT_SYMBOL(imx_iomux_set_gpr); int imx_iomux_setup_multiple_pins(const unsigned int *pin_list, unsigned count) { diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index fe334e5d34..85ba91d3c0 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -106,7 +106,7 @@ config DRIVER_VIDEO_BACKLIGHT config DRIVER_VIDEO_BACKLIGHT_PWM bool "PWM backlight support" - depends on PWM + depends on PWM && GPIOLIB depends on DRIVER_VIDEO_BACKLIGHT help Enable this to get support for backlight devices driven by a PWM. |