From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Sean Young <sean@mess.org>
Cc: linux-media@vger.kernel.org, "David Härdeman" <david@hardeman.nu>
Subject: Re: [RFC PATCH 2/6] [media] lirc: LIRC_[SG]ET_SEND_MODE should return -ENOSYS
Date: Thu, 14 May 2015 14:00:55 -0300 [thread overview]
Message-ID: <20150514140055.7f718d43@recife.lan> (raw)
In-Reply-To: <f0607fde6ec1ad120f62a80c53b1d44c4d5f4d81.1426801061.git.sean@mess.org>
Em Thu, 19 Mar 2015 21:50:13 +0000
Sean Young <sean@mess.org> escreveu:
> If the device cannot transmit then -ENOSYS should be returned. Also clarify
> that the ioctl should return modes, not features. The values happen to be
> identical.
Makes sense to me. Yet, applying it (without patch 1) causes compilation to
break.
I would put this at the top of the series, as this actually seems to be
a bug fix that it could eventually make sense to backport.
So, better to keep this patch independent.
>
> Signed-off-by: Sean Young <sean@mess.org>
> ---
> drivers/media/rc/ir-lirc-codec.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c
> index 98893a8..17fd956 100644
> --- a/drivers/media/rc/ir-lirc-codec.c
> +++ b/drivers/media/rc/ir-lirc-codec.c
> @@ -207,12 +207,19 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
>
> /* legacy support */
> case LIRC_GET_SEND_MODE:
> - val = LIRC_CAN_SEND_PULSE & LIRC_CAN_SEND_MASK;
> + if (!(dev->lirc->features & LIRC_CAN_SEND_MASK))
> + return -ENOSYS;
> +
> + val = LIRC_MODE_PULSE;
> break;
>
> case LIRC_SET_SEND_MODE:
> - if (val != (LIRC_MODE_PULSE & LIRC_CAN_SEND_MASK))
> + if (!(dev->lirc->features & LIRC_CAN_SEND_MASK))
> + return -ENOSYS;
> +
> + if (val != LIRC_MODE_PULSE)
> return -EINVAL;
> +
> return 0;
>
> /* TX settings */
next prev parent reply other threads:[~2015-05-14 17:01 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-19 21:50 [RFC PATCH 0/6] Send and receive decoded IR using lirc interface Sean Young
2015-03-19 21:50 ` [RFC PATCH 1/6] [media] lirc: remove broken features Sean Young
2015-05-14 16:39 ` Mauro Carvalho Chehab
2015-03-19 21:50 ` [RFC PATCH 2/6] [media] lirc: LIRC_[SG]ET_SEND_MODE should return -ENOSYS Sean Young
2015-05-14 17:00 ` Mauro Carvalho Chehab [this message]
2015-03-19 21:50 ` [RFC PATCH 3/6] [media] rc: lirc bridge should not be a raw decoder Sean Young
2015-05-14 16:47 ` Mauro Carvalho Chehab
2015-03-19 21:50 ` [RFC PATCH 4/6] [media] rc: lirc is not a protocol or a keymap Sean Young
2015-05-14 16:51 ` Mauro Carvalho Chehab
2015-05-19 20:34 ` David Härdeman
2015-05-20 8:19 ` Mauro Carvalho Chehab
2015-05-20 8:49 ` David Härdeman
2015-05-20 9:01 ` Mauro Carvalho Chehab
2015-05-20 9:06 ` David Härdeman
2015-05-20 19:16 ` David Härdeman
2015-05-20 20:54 ` David Härdeman
2015-03-19 21:50 ` [RFC PATCH 5/6] [media] lirc: pass IR scancodes to userspace via lirc bridge Sean Young
2015-05-14 16:58 ` Mauro Carvalho Chehab
2015-03-19 21:50 ` [RFC PATCH 6/6] [media] rc: teach lirc how to send scancodes Sean Young
2015-05-14 17:04 ` Mauro Carvalho Chehab
2015-05-20 8:53 ` David Härdeman
2015-05-20 9:08 ` Mauro Carvalho Chehab
2015-05-20 9:18 ` David Härdeman
2015-03-30 21:18 ` [RFC PATCH 0/6] Send and receive decoded IR using lirc interface David Härdeman
2015-03-30 23:08 ` Sean Young
2015-04-01 20:33 ` David Härdeman
2015-03-31 23:47 ` Mauro Carvalho Chehab
2015-04-01 22:19 ` David Härdeman
2015-04-01 23:10 ` Mauro Carvalho Chehab
2015-04-01 23:55 ` David Härdeman
2015-04-02 11:37 ` David Härdeman
2015-04-03 10:11 ` Sean Young
2015-04-03 18:41 ` David Härdeman
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=20150514140055.7f718d43@recife.lan \
--to=mchehab@osg.samsung.com \
--cc=david@hardeman.nu \
--cc=linux-media@vger.kernel.org \
--cc=sean@mess.org \
/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.