summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips/gen_probe.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2013-07-08 06:05:12 -0700
committerDavid Woodhouse <David.Woodhouse@intel.com>2013-08-05 21:01:42 +0100
commitf9827dde2f6a1b64f8241de18ccf5027a636d8f4 (patch)
tree0db03c67262eed2efc6273e2398181e6613f64b9 /drivers/mtd/chips/gen_probe.c
parent2e294972f0c3616df160f95604d1a75056b75a8a (diff)
downloadblackbird-op-linux-f9827dde2f6a1b64f8241de18ccf5027a636d8f4.tar.gz
blackbird-op-linux-f9827dde2f6a1b64f8241de18ccf5027a636d8f4.zip
mtd: refactor call to request_module
This reduces the size of the stack frame when calling request_module(). Performing the sprintf before the call is not needed. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/chips/gen_probe.c')
-rw-r--r--drivers/mtd/chips/gen_probe.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/chips/gen_probe.c b/drivers/mtd/chips/gen_probe.c
index 74dbb6bcf488..ffb36ba8a6e0 100644
--- a/drivers/mtd/chips/gen_probe.c
+++ b/drivers/mtd/chips/gen_probe.c
@@ -211,9 +211,7 @@ static inline struct mtd_info *cfi_cmdset_unknown(struct map_info *map,
probe_function = __symbol_get(probename);
if (!probe_function) {
- char modname[sizeof("cfi_cmdset_%4.4X")];
- sprintf(modname, "cfi_cmdset_%4.4X", type);
- request_module(modname);
+ request_module("cfi_cmdset_%4.4X", type);
probe_function = __symbol_get(probename);
}
OpenPOWER on IntegriCloud