]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: devices: elm: check for device's presence before configuration
authorDaniel Mack <zonque@gmail.com>
Sun, 3 Mar 2013 23:57:20 +0000 (00:57 +0100)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tue, 19 Mar 2013 08:22:30 +0000 (10:22 +0200)
commitc24d27bba39896d9376eb3698d657835b3929a40
treef7a3cf977b4bf5580f8f26c40295d8e3c3a480c7
parent4ae5ea925053a7a02d53d86096a22c5414207ccf
mtd: devices: elm: check for device's presence before configuration

In case the driver is not probed - due to config mismatches or errors
in the DTS files - dev_get_drvdata() returns NULL, leading to an Ooops
during boot.

Make elm_config() return an error in such cases to propagate the error
up to the user, so it can fall back to software mode.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/devices/elm.c
drivers/mtd/nand/omap2.c
include/linux/platform_data/elm.h