summaryrefslogtreecommitdiffstats
path: root/drivers/nvmem/lpc18xx_otp.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-10-20 18:57:42 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-08 13:54:17 +0100
commit17eb18d674d586e609a3e268975edd728d5c84a3 (patch)
treeb3e4c9a8924266288c4761cbca4519862689bc16 /drivers/nvmem/lpc18xx_otp.c
parentnvmem: qfprom: fix different address space warnings of sparse (diff)
downloadlinux-17eb18d674d586e609a3e268975edd728d5c84a3.tar.xz
linux-17eb18d674d586e609a3e268975edd728d5c84a3.zip
nvmem: set nvmem->owner to nvmem->dev->driver->owner if unset
All nvmem drivers are supposed to set the owner field of struct nvmem_config, but this matches nvmem->dev->driver->owner. As far as I see in drivers/nvmem/ directory, all the drivers are the case. So, make nvmem_register() set the nvmem's owner to the associated driver's owner unless nvmem_config sets otherwise. Remove .owner settings in the drivers that are now redundant. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem/lpc18xx_otp.c')
-rw-r--r--drivers/nvmem/lpc18xx_otp.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/nvmem/lpc18xx_otp.c b/drivers/nvmem/lpc18xx_otp.c
index be8d07403ffc..95268db155e9 100644
--- a/drivers/nvmem/lpc18xx_otp.c
+++ b/drivers/nvmem/lpc18xx_otp.c
@@ -64,7 +64,6 @@ static struct nvmem_config lpc18xx_otp_nvmem_config = {
.read_only = true,
.word_size = LPC18XX_OTP_WORD_SIZE,
.stride = LPC18XX_OTP_WORD_SIZE,
- .owner = THIS_MODULE,
.reg_read = lpc18xx_otp_read,
};