public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: gregkh@linuxfoundation•org (Greg KH)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v2 2/3] nvmem: core: set the size for the nvmem binary file.
Date: Wed, 7 Oct 2015 13:56:12 +0100	[thread overview]
Message-ID: <20151007125612.GB7962@kroah.com> (raw)
In-Reply-To: <1444215655-10878-1-git-send-email-srinivas.kandagatla@linaro.org>

On Wed, Oct 07, 2015 at 12:00:55PM +0100, Srinivas Kandagatla wrote:
> This patch sets the actual size of binary file to the nvmem size.
> Previously this was not possible as the core was using the static global
> data structures for attributes.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro•org>
> ---
>  drivers/nvmem/core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
> index 0a70e31..737fa75 100644
> --- a/drivers/nvmem/core.c
> +++ b/drivers/nvmem/core.c
> @@ -315,6 +315,7 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)
>  	if (!nvmem->read_only)
>  		nvmem->bin.attr.mode |= S_IWUSR;
>  
> +	nvmem->bin.size = nvmem->size;

Why does the size matter?  What userspace tool needs to know this?

thanks,

greg k-h

  reply	other threads:[~2015-10-07 12:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07 10:58 [PATCH v2 0/3] nvmem: make sysfs binary file permissions more flexible Srinivas Kandagatla
2015-10-07 11:00 ` [PATCH v2 1/3] nvmem: core: make default user binary file root-access only Srinivas Kandagatla
2015-10-07 11:33   ` Russell King - ARM Linux
2015-10-07 13:46     ` Srinivas Kandagatla
2015-10-07 16:23       ` Russell King - ARM Linux
2015-10-07 12:55   ` Greg KH
2015-10-07 13:18     ` Srinivas Kandagatla
2015-10-07 16:12       ` Greg KH
2015-10-07 11:00 ` [PATCH v2 2/3] nvmem: core: set the size for the nvmem binary file Srinivas Kandagatla
2015-10-07 12:56   ` Greg KH [this message]
2015-10-07 13:21     ` Srinivas Kandagatla
2015-10-07 11:01 ` [PATCH v2 3/3] nvmem: core: add sysfs file mode flag in nvmem_config Srinivas Kandagatla
2015-10-07 12:56   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151007125612.GB7962@kroah.com \
    --to=gregkh@linuxfoundation$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox