]> 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>
Mon, 11 Mar 2013 09:19:49 +0000 (11:19 +0200)
commita70c811feace3527f073d818c39961eb5dfa6263
tree02a31771bc4826ee6a46d5ade4db962e13795fb6
parenta1eb8f7c5882829229053f2b299c98a799e67588
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