[media] em28xx: Show a warning if the board does not support remote controls

Message ID 1338407260-14367-1-git-send-email-martin.blumenstingl@googlemail.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Martin Blumenstingl May 30, 2012, 7:47 p.m. UTC
This simply shows a little warning if the board does not have remote
control support. This should make it easier for users to see if they
have misconfigured their system or if the driver simply does not have
rc-support for their card (yet).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 drivers/media/video/em28xx/em28xx-input.c |    2 ++
 1 file changed, 2 insertions(+)
  

Comments

Martin Blumenstingl May 30, 2012, 7:50 p.m. UTC | #1
Hello,

thanks to Fabio and Ezequiel for the suggestions.
This is the latest version of my patch.

It basically shows this when connecting my stick
(of course only if I remove my other patch):
[ 1597.796028] em28xx #0: chip ID is em2884
[ 1597.849321] em28xx #0: Identified as Terratec Cinergy HTC Stick (card=82)
... (snip) ...
[ 1597.851680] em28xx #0: Remote control support is not available for this card.

Looks good, since we don't need to duplicate the card/model ID.
But we still get all required information.

Regards,
Martin
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Ezequiel Garcia May 30, 2012, 8:21 p.m. UTC | #2
Hi Martin,

On Wed, May 30, 2012 at 4:50 PM, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> Hello,
>
> thanks to Fabio and Ezequiel for the suggestions.
> This is the latest version of my patch.
>
> It basically shows this when connecting my stick
> (of course only if I remove my other patch):
> [ 1597.796028] em28xx #0: chip ID is em2884
> [ 1597.849321] em28xx #0: Identified as Terratec Cinergy HTC Stick (card=82)
> ... (snip) ...
> [ 1597.851680] em28xx #0: Remote control support is not available for this card.
>
> Looks good, since we don't need to duplicate the card/model ID.
> But we still get all required information.
>

When sending new versions of a patch you should mark them as [PATCH
v2], [PATCH v3], etc in the subject.
This way maintainers can follow the patch evolution.

You can search through the mailing list for an example. Here's a random example:
http://www.spinics.net/lists/linux-media/msg47876.html

I'm not saying you should re-send this patch, it's just for you to
know for future patches.

Hope it helps,
Ezequiel.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Martin Blumenstingl May 30, 2012, 8:22 p.m. UTC | #3
Hi,

> When sending new versions of a patch you should mark them as [PATCH
> v2], [PATCH v3], etc in the subject.
> This way maintainers can follow the patch evolution.

Thanks for the hint.
I just noticed that I spammed the patchwork system with my patch-mess too.
I should probably also always reply to the last mail which includes a patch.

I'll keep it in mind the next time, thanks!
Martin
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Patch

diff --git a/drivers/media/video/em28xx/em28xx-input.c b/drivers/media/video/em28xx/em28xx-input.c
index fce5f76..5e30c4f 100644
--- a/drivers/media/video/em28xx/em28xx-input.c
+++ b/drivers/media/video/em28xx/em28xx-input.c
@@ -527,6 +527,8 @@  static int em28xx_ir_init(struct em28xx *dev)
 
 	if (dev->board.ir_codes == NULL) {
 		/* No remote control support */
+		em28xx_warn("Remote control support is not available for "
+				"this card.\n");
 		return 0;
 	}