[RESEND PATCH 2/5] nvmem: mtk-efuse: use stack for nvmem_config instead of malloc'ing it

2017-10-20 Thread Masahiro Yamada
nvmem_register() copies all the members of nvmem_config to nvmem_device. So, nvmem_config is one-time use data during probing. There is no point to keep it until the driver detach. Using stack should be no problem because nvmem_config is pretty small. Signed-off-by: Masahiro Yamada Acked-by: Se

Re: [PATCH 2/5] nvmem: mtk-efuse: use stack for nvmem_config instead of malloc'ing it

2017-09-21 Thread Sean Wang
Hi, Masahiro On Thu, 2017-09-21 at 11:09 +0900, Masahiro Yamada wrote: > Hi Sean, > > > 2017-09-21 1:32 GMT+09:00 Sean Wang : > > Hi, Masahiro > > > > For maintainability, I felt it's better if we use the same way to > > register nvmem as that most drivers does under nvmem usually using > > stat

Re: [PATCH 2/5] nvmem: mtk-efuse: use stack for nvmem_config instead of malloc'ing it

2017-09-20 Thread Masahiro Yamada
Hi Sean, 2017-09-21 1:32 GMT+09:00 Sean Wang : > Hi, Masahiro > > For maintainability, I felt it's better if we use the same way to > register nvmem as that most drivers does under nvmem usually using > static structure. Otherwise, they should also be changed to use the > one-time data in stack t

Re: [PATCH 2/5] nvmem: mtk-efuse: use stack for nvmem_config instead of malloc'ing it

2017-09-20 Thread Sean Wang
Hi, Masahiro For maintainability, I felt it's better if we use the same way to register nvmem as that most drivers does under nvmem usually using static structure. Otherwise, they should also be changed to use the one-time data in stack to avoid extra bytes to keep them. Sean On Mon, 20

[PATCH 2/5] nvmem: mtk-efuse: use stack for nvmem_config instead of malloc'ing it

2017-09-11 Thread Masahiro Yamada
nvmem_register() copies all the members of nvmem_config to nvmem_device. So, nvmem_config is one-time use data during probing. There is no point to keep it until the driver detach. Using stack should be no problem because nvmem_config is pretty small. Signed-off-by: Masahiro Yamada --- driver