mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-21 06:50:25 +00:00
nvmem: meson-efuse: simplify read callback
Most of the code and variables in the read callback is not necessary. Keep only what is required. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
401488d121
commit
a29a63bdaf
1 changed files with 2 additions and 9 deletions
|
@ -24,15 +24,8 @@
|
||||||
static int meson_efuse_read(void *context, unsigned int offset,
|
static int meson_efuse_read(void *context, unsigned int offset,
|
||||||
void *val, size_t bytes)
|
void *val, size_t bytes)
|
||||||
{
|
{
|
||||||
u8 *buf = val;
|
return meson_sm_call_read((u8 *)val, bytes, SM_EFUSE_READ, offset,
|
||||||
int ret;
|
bytes, 0, 0, 0);
|
||||||
|
|
||||||
ret = meson_sm_call_read(buf, bytes, SM_EFUSE_READ, offset,
|
|
||||||
bytes, 0, 0, 0);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct of_device_id meson_efuse_match[] = {
|
static const struct of_device_id meson_efuse_match[] = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue