s5j/sflash: allocate sflashdev statically
authorHeesub Shin <heesub.shin@samsung.com>
Fri, 17 Mar 2017 12:00:01 +0000 (21:00 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Mon, 17 Apr 2017 10:52:04 +0000 (19:52 +0900)
commit5b4a8a90cc2c8daf453d63325333eaa76813bc8d
tree5333268d722f9d887ffabf034094347e2ce44acf
parentd8c51ed65b72f74b812a5be37376b5c469e40687
s5j/sflash: allocate sflashdev statically

This commit moves dynamic allocation of sflashdev to static allocation.
There is no reason to have it dynamic given that it is never freed once
initialized. In addition, code lines that manage it dynamically occupies
unnecessary binary footprints.

Here is comparison of binary footprints:

                         text       data        bss         dec
    Before (dynamic)     1344          0         19        1363
    After  (static)      1280         20         15        1315

With this commit, overall footprint has reduced 48bytes. Advantage of
static allocation is clear.

Change-Id: I5d12e455c7ad85ee389d17b1b246695062d30bb9
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
os/arch/arm/src/s5j/s5j_sflash.c