diff options
| author | Daniel Mack <zonque@gmail.com> | 2013-03-03 18:57:20 -0500 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-04-05 07:57:18 -0400 |
| commit | ad2457894c272279bf73ca46ae5ea5de4876d2a0 (patch) | |
| tree | 11675f958813b5a7cefa1771212eaed57032acb1 /include/linux/platform_data | |
| parent | 0cca9fbf5d0a65fb536d38427f48460fda1f2e99 (diff) | |
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>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/elm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/platform_data/elm.h b/include/linux/platform_data/elm.h index 1bd5244d1dcd..bf0a83b7ed9d 100644 --- a/include/linux/platform_data/elm.h +++ b/include/linux/platform_data/elm.h | |||
| @@ -50,5 +50,5 @@ struct elm_errorvec { | |||
| 50 | 50 | ||
| 51 | void elm_decode_bch_error_page(struct device *dev, u8 *ecc_calc, | 51 | void elm_decode_bch_error_page(struct device *dev, u8 *ecc_calc, |
| 52 | struct elm_errorvec *err_vec); | 52 | struct elm_errorvec *err_vec); |
| 53 | void elm_config(struct device *dev, enum bch_ecc bch_type); | 53 | int elm_config(struct device *dev, enum bch_ecc bch_type); |
| 54 | #endif /* __ELM_H */ | 54 | #endif /* __ELM_H */ |
