All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@ti.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] regmap: Add support for writing to regmap `registers'
Date: Wed, 22 Feb 2012 12:55:52 +0000	[thread overview]
Message-ID: <20120222125551.GB7340@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1329914630-17624-1-git-send-email-dp@opensource.wolfsonmicro.com>

[-- Attachment #1: Type: text/plain, Size: 865 bytes --]

On Wed, Feb 22, 2012 at 12:43:50PM +0000, Dimitris Papastamos wrote:
> To enable writing to the regmap `registers' file, users will
> need to modify the source directly and #define REGMAP_ALLOW_WRITE_DEBUGFS.
> The reason for this is that it is dangerous to expose this
> functionality in general where clients could potentially be PMICs.

Applied but...

> +static ssize_t regmap_map_write_file(struct file *file, const char __user *user_buf,
> +				    size_t count, loff_t *ppos)

...with this wrapped into 80 columns.

>  static const struct file_operations regmap_map_fops = {
>  	.open = regmap_open_file,
>  	.read = regmap_map_read_file,
> +#ifdef REGMAP_ALLOW_WRITE_DEBUGFS
> +	.write = regmap_map_write_file,
> +#endif

It's also a bit more idiomatic to have an #else #define function NULL in
the main ifdef for stuff like this; I'll fix that up as well.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-02-22 12:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-22 12:43 [PATCH 2/3] regmap: Add support for writing to regmap `registers' Dimitris Papastamos
2012-02-22 12:55 ` Mark Brown [this message]
2012-02-22 13:57   ` Dimitris Papastamos

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=20120222125551.GB7340@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=dp@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.