From: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
To: Frank Haverkamp <haver@linux.vnet.ibm.com>
Cc: gregkh@linuxfoundation.org, sebott@linux.vnet.ibm.com,
geliangtang@163.com, linux-kernel@vger.kernel.org,
bhelgaas@google.com, esa@linux.vnet.ibm.com,
breno.leitao@gmail.com, schwidefsky@de.ibm.com
Subject: Re: [PATCH] GenWQE: Change default access rights for device node
Date: Wed, 29 Jun 2016 17:50:45 -0300 [thread overview]
Message-ID: <874m8bpvmi.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <20160629134743.12424-2-haver@linux.vnet.ibm.com> (Frank Haverkamp's message of "Wed, 29 Jun 2016 15:47:43 +0200")
Frank Haverkamp <haver@linux.vnet.ibm.com> writes:
> Since it should always be ok for normal users to operate the accelerator,
> it makes sense to change it in our driver, rather than adding udev rules
> for all Linux distributions.
>
> Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com>
Reviewed-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
> ---
> drivers/misc/genwqe/card_base.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/misc/genwqe/card_base.c b/drivers/misc/genwqe/card_base.c
> index 4cf8f82..768a057 100644
> --- a/drivers/misc/genwqe/card_base.c
> +++ b/drivers/misc/genwqe/card_base.c
> @@ -1355,6 +1355,19 @@ static struct pci_driver genwqe_driver = {
> };
>
> /**
> + * genwqe_devnode() - Set default access mode for genwqe devices.
> + *
> + * Default mode should be rw for everybody. Do not change default
> + * device name.
> + */
> +static char *genwqe_devnode(struct device *dev, umode_t *mode)
> +{
> + if (mode)
> + *mode = 0666;
> + return NULL;
> +}
> +
> +/**
> * genwqe_init_module() - Driver registration and initialization
> */
> static int __init genwqe_init_module(void)
> @@ -1367,6 +1380,8 @@ static int __init genwqe_init_module(void)
> return -ENOMEM;
> }
>
> + class_genwqe->devnode = genwqe_devnode;
> +
> debugfs_genwqe = debugfs_create_dir(GENWQE_DEVNAME, NULL);
> if (!debugfs_genwqe) {
> rc = -ENOMEM;
--
Gabriel Krisman Bertazi
prev parent reply other threads:[~2016-06-29 20:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 13:47 [PATCH] GenWQE: Change device access rights Frank Haverkamp
2016-06-29 13:47 ` [PATCH] GenWQE: Change default access rights for device node Frank Haverkamp
2016-06-29 20:50 ` Gabriel Krisman Bertazi [this message]
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=874m8bpvmi.fsf@linux.vnet.ibm.com \
--to=krisman@linux.vnet.ibm.com \
--cc=bhelgaas@google.com \
--cc=breno.leitao@gmail.com \
--cc=esa@linux.vnet.ibm.com \
--cc=geliangtang@163.com \
--cc=gregkh@linuxfoundation.org \
--cc=haver@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=sebott@linux.vnet.ibm.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.