mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Markus Rechberger" <mrechberger@gmail.com>
To: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	em28xx <em28xx@mcentral.de>
Cc: acano@fastmail.fm, "Andre Kelmanson" <akelmanson@gmail.com>,
	"Bouwsma Barry" <freebeer.bouwsma@gmail.com>,
	"Dan Kreiser" <kreiser@informatik.hu-berlin.de>,
	"Frank Neuber" <fn@kernelport.de>,
	"Jelle de Jong" <jelledejong@powercraft.nl>,
	"John Stowers" <john.stowers.lists@gmail.com>,
	"Lukas Kuna" <lukas.kuna@evkanet.net>,
	"Stefan Vonolfen" <stefan.vonolfen@gmail.com>,
	"Stephan Berberig" <s.berberig@arcor.de>,
	"Thomas Giesecke" <thomas.giesecke@ibgmbh-naumburg.de>,
	"Vitaly Wool" <vwool@ru.mvista.com>,
	"Zhenyu Wang" <zhen78@gmail.com>
Subject: [PATCH 7/7] adding common used headers
Date: Wed, 22 Oct 2008 23:13:20 +0200	[thread overview]
Message-ID: <d9def9db0810221413s152f6fa7s21caffbfa3fa5712@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 142 bytes --]

    adding common used headers

    tunerchip.h:
    just contains an internal used struct which can be used for
setting up a tuner frontend.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: em28xx-07.diff --]
[-- Type: text/x-diff; name=em28xx-07.diff, Size: 1864 bytes --]

commit f67a44d14a847e3fcc4fd74d1660666535c26905
Author: Markus Rechberger <mrechberger@sundtek.de>
Date:   Wed Oct 22 22:14:17 2008 +0200

    adding common used headers
    
    tunerchip.h:
    just contains an internal used struct which can be used for setting up a tuner frontend.

Signed-off-by: Markus Rechberger <mrechberger@sundtek.de>

diff --git a/drivers/media/video/empia/include/tunerchip.h b/drivers/media/video/empia/include/tunerchip.h
new file mode 100644
index 0000000..75ba8e6
--- /dev/null
+++ b/drivers/media/video/empia/include/tunerchip.h
@@ -0,0 +1,32 @@
+#ifndef _TUNER_CHIP_H
+#define _TUNER_CHIP_H
+
+struct tuner_module {
+	void *priv;
+        int (*tuner_cmd)(struct tuner_module *client, unsigned int cmd, void *data);
+        int (*shutdown)(struct tuner_module *client);
+        int (*set_frequency)(struct tuner_module *client, unsigned long frequency_in_hz);
+        int (*get_frequency_error)(struct tuner_module *client, long *frequency_error_mhz);
+        int (*get_lock_status)(struct tuner_module *client, unsigned short int *lock_status);
+        int (*get_version)(struct tuner_module *client, unsigned char* hw_majorversion, unsigned char* hw_minorversion, unsigned char* fw_majorversion, unsigned char* fw_minorversion);
+        int (*full_scan)(struct tuner_module *client, unsigned int freq_min, unsigned int freq_max, int freq_list_size, unsigned int *freq_list, int *nb_freq_found );
+	void (*release)(struct tuner_module *client);
+};
+
+#define tuner_chip_detach(MOD) if(MOD) { \
+				MOD->release(MOD); \
+				symbol_put_addr(MOD->release); \
+			       }
+
+#define tuner_chip_attach(FUNCTION, ARGS...) ({ \
+	struct tuner_module *mod = NULL; \
+	typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
+	if (__a) {  \
+		mod=__a(ARGS); \
+		if (mod == 0) \
+			symbol_put(__a); \
+	} \
+	mod; \
+})
+
+#endif

             reply	other threads:[~2008-10-22 21:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-22 21:13 Markus Rechberger [this message]
2008-10-24 17:38 ` Mauro Carvalho Chehab
  -- strict thread matches above, loose matches on Subject: below --
2008-10-22 21:11 Markus Rechberger

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=d9def9db0810221413s152f6fa7s21caffbfa3fa5712@mail.gmail.com \
    --to=mrechberger@gmail.com \
    --cc=acano@fastmail.fm \
    --cc=akelmanson@gmail.com \
    --cc=em28xx@mcentral.de \
    --cc=fn@kernelport.de \
    --cc=freebeer.bouwsma@gmail.com \
    --cc=jelledejong@powercraft.nl \
    --cc=john.stowers.lists@gmail.com \
    --cc=kreiser@informatik.hu-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.kuna@evkanet.net \
    --cc=s.berberig@arcor.de \
    --cc=stefan.vonolfen@gmail.com \
    --cc=thomas.giesecke@ibgmbh-naumburg.de \
    --cc=vwool@ru.mvista.com \
    --cc=zhen78@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

all inboxes | Powered by JetHome®