All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Merle <thierry.merle@free.fr>
To: Linux DVB Mailing List <linux-dvb@linuxtv.org>,
	Linux and Kernel Video <video4linux-list@redhat.com>
Subject: [PATCH] em28xx-dvb: dvb_init() code factorization
Date: Sat, 11 Oct 2008 22:08:49 +0200	[thread overview]
Message-ID: <48F107D1.2020902@free.fr> (raw)

Hello all,
here is a trivial patch that does code factorization between cases in dvb_init() function of the em28xx-dvb component.
Is there a reason not to do that?

Cheers,
Thierry

patch description:

In dvb_init(),
        case EM2880_BOARD_TERRATEC_HYBRID_XS:
        case EM2880_BOARD_KWORLD_DVB_310U:
can be put in the same case than EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
since they do the same thing.

Priority: normal

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>

diff -r 1e7e0b56d97b -r 5da1a92af6a1 linux/drivers/media/video/em28xx/em28xx-dvb.c
--- a/linux/drivers/media/video/em28xx/em28xx-dvb.c	Sat Oct 11 12:44:38 2008 -0300
+++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c	Sat Oct 11 21:56:13 2008 +0200
@@ -422,6 +422,8 @@
 		}
 		break;
 	case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
+	case EM2880_BOARD_TERRATEC_HYBRID_XS:
+	case EM2880_BOARD_KWORLD_DVB_310U:
 		dvb->frontend = dvb_attach(zl10353_attach,
 					   &em28xx_zl10353_with_xc3028,
 					   &dev->i2c_adap);
@@ -443,24 +445,6 @@
 		}
 		break;
 #endif
-	case EM2880_BOARD_TERRATEC_HYBRID_XS:
-		dvb->frontend = dvb_attach(zl10353_attach,
-						&em28xx_zl10353_with_xc3028,
-						&dev->i2c_adap);
-		if (attach_xc3028(0x61, dev) < 0) {
-			 result = -EINVAL;
-			goto out_free;
-		}
-		break;
-	case EM2880_BOARD_KWORLD_DVB_310U:
-		dvb->frontend = dvb_attach(zl10353_attach,
-						&em28xx_zl10353_with_xc3028,
-						&dev->i2c_adap);
-		if (attach_xc3028(0x61, dev) < 0) {
-			result = -EINVAL;
-			goto out_free;
-		}
-		break;
 	default:
 		printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card"
 				" isn't supported yet\n",

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

                 reply	other threads:[~2008-10-11 20:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=48F107D1.2020902@free.fr \
    --to=thierry.merle@free.fr \
    --cc=linux-dvb@linuxtv.org \
    --cc=video4linux-list@redhat.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.