mtd: mtdoops: do not use mtd->panic_write directly
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 28 Dec 2011 15:27:18 +0000 (17:27 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 9 Jan 2012 18:26:13 +0000 (18:26 +0000)
commit016c1291ce70a22f15f666441a4fd2f0b450375b
tree650a0d91aa87bcf6146f98eadf0341d46ce0ef0f
parent4991e7251ed951a5f33faf25912e9db416306309
mtd: mtdoops: do not use mtd->panic_write directly

Instead of checking if 'mtd->panic_write' is defined, call 'mtd_panic_write()'
and check the error code - '-EOPNOTSUPP' will be returned if the function is
not defined.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/mtdoops.c
include/linux/mtd/mtd.h