linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Krufky <mkrufky@linuxtv.org>
To: linux-media@vger.kernel.org
Cc: dheitmueller@kernellabs.com, Michael Krufky <mkrufky@linuxtv.org>
Subject: [PATCH 2/2] au0828: break au0828_card_setup() down into smaller functions
Date: Tue,  4 Dec 2012 11:07:45 -0500	[thread overview]
Message-ID: <1354637265-23335-2-git-send-email-mkrufky@linuxtv.org> (raw)
In-Reply-To: <1354637265-23335-1-git-send-email-mkrufky@linuxtv.org>

Pull the analog frontend setup code out of au0828_card_setup into its
own seperate function, au0828_card_analog_fe_setup().

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
---
 drivers/media/usb/au0828/au0828-cards.c |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/media/usb/au0828/au0828-cards.c b/drivers/media/usb/au0828/au0828-cards.c
index 7b5b742..88e35df 100644
--- a/drivers/media/usb/au0828/au0828-cards.c
+++ b/drivers/media/usb/au0828/au0828-cards.c
@@ -185,14 +185,11 @@ static void hauppauge_eeprom(struct au0828_dev *dev, u8 *eeprom_data)
 	       __func__, tv.model);
 }
 
+void au0828_card_analog_fe_setup(struct au0828_dev *dev);
+
 void au0828_card_setup(struct au0828_dev *dev)
 {
 	static u8 eeprom[256];
-#ifdef CONFIG_VIDEO_AU0828_V4L2
-	struct tuner_setup tun_setup;
-	struct v4l2_subdev *sd;
-	unsigned int mode_mask = T_ANALOG_TV;
-#endif
 
 	dprintk(1, "%s()\n", __func__);
 
@@ -213,7 +210,16 @@ void au0828_card_setup(struct au0828_dev *dev)
 		break;
 	}
 
+	au0828_card_analog_fe_setup(dev);
+}
+
+void au0828_card_analog_fe_setup(struct au0828_dev *dev)
+{
 #ifdef CONFIG_VIDEO_AU0828_V4L2
+	struct tuner_setup tun_setup;
+	struct v4l2_subdev *sd;
+	unsigned int mode_mask = T_ANALOG_TV;
+
 	if (AUVI_INPUT(0).type != AU0828_VMUX_UNDEFINED) {
 		/* Load the analog demodulator driver (note this would need to
 		   be abstracted out if we ever need to support a different
-- 
1.7.10.4


  reply	other threads:[~2012-12-04 16:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04 16:07 [PATCH 1/2] au0828: remove forced dependency of VIDEO_AU0828 on VIDEO_V4L2 Michael Krufky
2012-12-04 16:07 ` Michael Krufky [this message]
2012-12-04 16:17 ` Devin Heitmueller
2012-12-04 16:25   ` Michael Krufky
2012-12-04 16:29     ` Devin Heitmueller

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=1354637265-23335-2-git-send-email-mkrufky@linuxtv.org \
    --to=mkrufky@linuxtv.org \
    --cc=dheitmueller@kernellabs.com \
    --cc=linux-media@vger.kernel.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 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).