From: Jiri Kosina <jikos@kernel.org>
To: Yangtao Li <tiny.windzz@gmail.com>
Cc: benjamin.tissoires@redhat.com, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: debug: Change to use DEFINE_SHOW_ATTRIBUTE macro
Date: Wed, 19 Dec 2018 14:21:50 +0100 (CET) [thread overview]
Message-ID: <nycvar.YFH.7.76.1812191421360.17216@cbobk.fhfr.pm> (raw)
In-Reply-To: <20181201024951.5508-1-tiny.windzz@gmail.com>
On Fri, 30 Nov 2018, Yangtao Li wrote:
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
> drivers/hid/hid-debug.c | 12 +-----------
> 1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
> index b48100236df8..c530476edba6 100644
> --- a/drivers/hid/hid-debug.c
> +++ b/drivers/hid/hid-debug.c
> @@ -1072,11 +1072,6 @@ static int hid_debug_rdesc_show(struct seq_file *f, void *p)
> return 0;
> }
>
> -static int hid_debug_rdesc_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, hid_debug_rdesc_show, inode->i_private);
> -}
> -
> static int hid_debug_events_open(struct inode *inode, struct file *file)
> {
> int err = 0;
> @@ -1211,12 +1206,7 @@ static int hid_debug_events_release(struct inode *inode, struct file *file)
> return 0;
> }
>
> -static const struct file_operations hid_debug_rdesc_fops = {
> - .open = hid_debug_rdesc_open,
> - .read = seq_read,
> - .llseek = seq_lseek,
> - .release = single_release,
> -};
> +DEFINE_SHOW_ATTRIBUTE(hid_debug_rdesc);
Applied to hid.git#for-4.21/core. Thanks,
--
Jiri Kosina
SUSE Labs
prev parent reply other threads:[~2018-12-19 13:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-01 2:49 [PATCH] HID: debug: Change to use DEFINE_SHOW_ATTRIBUTE macro Yangtao Li
2018-12-19 13:21 ` Jiri Kosina [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=nycvar.YFH.7.76.1812191421360.17216@cbobk.fhfr.pm \
--to=jikos@kernel.org \
--cc=benjamin.tissoires@redhat.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tiny.windzz@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).