nvmem: Use the same permissions for eeprom as for nvmem
authorJean Delvare <jdelvare@suse.de>
Sun, 28 Jul 2019 16:42:55 +0000 (18:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Sep 2019 05:14:08 +0000 (07:14 +0200)
commitf3248ed5e1f509c4a818d4bcf409851b2b88b147
tree8456240f6edbbead012b78d12a3cd3f30135ae3e
parent22571a43d06412a7681de4d7ee383b70a73d8e43
nvmem: Use the same permissions for eeprom as for nvmem

commit e70d8b287301eb6d7c7761c6171c56af62110ea3 upstream.

The compatibility "eeprom" attribute is currently root-only no
matter what the configuration says. The "nvmem" attribute does
respect the setting of the root_only configuration bit, so do the
same for "eeprom".

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Fixes: b6c217ab9be6 ("nvmem: Add backwards compatibility support for older EEPROM drivers.")
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20190728184255.563332e6@endymion
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/core.c