* [PATCH] IRDA device driver API 2.6 -> 2.4 backport
@ 2004-01-13 22:42 Jens David
0 siblings, 0 replies; only message in thread
From: Jens David @ 2004-01-13 22:42 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 781 bytes --]
Hi Jeff, all,
don' t know excactly where to send this to.
I had a little spare time this week as my doctor grounded me, so to
relax I did a bit of kernel hacking and get my notebook working. 8-)
This patch adds the "alloc_irdadev" primitive to Linux-2.4 . Modeled
after and code stolen from Linux-2.6 .
This enables practically drop-in addition of Linux-2.6 IRDA drivers
to Linux-2.4.
This patch is prerequisite for another patch from me which adds
via-ircc to the IRDA driver modules.
Patch against linux-2.4.24-0pre2.1mdk from current Mandrake Cooker.
Should apply to vanilla Linux-2.4.24 as well.
-- Jens
--
Jens David, DG1KJD
Email: dg1kjd@afthd.tu-darmstadt.de
http://www.afthd.tu-darmstadt.de/~dg1kjd
Work: +49 351 80800 527 --- Home/Mobile: +49 173 6394993
[-- Attachment #2: add alloc_irdadev primitive from 2.6 to Linux-2.4 --]
[-- Type: text/x-diff, Size: 1691 bytes --]
--- linux-2.4.24-0.pre2.1mdk.orig/include/net/irda/irda_device.h 2001-06-20 02:08:05.000000000 +0200
+++ linux-2.4.24-0.pre2.1mdk.copy/include/net/irda/irda_device.h 2004-01-13 12:12:44.000000000 +0100
@@ -169,6 +169,7 @@ int irda_device_set_raw_mode(struct net
int irda_device_set_dtr_rts(struct net_device *dev, int dtr, int rts);
int irda_device_change_speed(struct net_device *dev, __u32 speed);
int irda_device_setup(struct net_device *dev);
+struct net_device *alloc_irdadev(int sizeof_priv);
/* Dongle interface */
void irda_device_unregister_dongle(struct dongle_reg *dongle);
--- linux-2.4.24-0.pre2.1mdk.orig/net/irda/irda_device.c 2003-11-28 19:26:21.000000000 +0100
+++ linux-2.4.24-0.pre2.1mdk.copy/net/irda/irda_device.c 2004-01-11 00:25:09.000000000 +0100
@@ -461,6 +461,17 @@ int irda_device_setup(struct net_device
}
/*
+ * Funciton alloc_irdadev
+ * Allocates and sets up an IRDA device in a manner similar to
+ * alloc_etherdev.
+ */
+struct net_device *alloc_irdadev(int sizeof_priv)
+{
+ return alloc_netdev(sizeof_priv, "irda%d", irda_device_setup);
+}
+
+
+/*
* Function irda_device_txqueue_empty (dev)
*
* Check if there is still some frames in the transmit queue for this
--- linux-2.4.24-0.pre2.1mdk.orig/net/irda/irsyms.c 2003-08-25 13:44:44.000000000 +0200
+++ linux-2.4.24-0.pre2.1mdk.copy/net/irda/irsyms.c 2004-01-11 00:26:47.000000000 +0100
@@ -145,6 +145,7 @@ EXPORT_SYMBOL(irlap_close);
EXPORT_SYMBOL(irda_init_max_qos_capabilies);
EXPORT_SYMBOL(irda_qos_bits_to_value);
EXPORT_SYMBOL(irda_device_setup);
+EXPORT_SYMBOL(alloc_irdadev);
EXPORT_SYMBOL(irda_device_set_media_busy);
EXPORT_SYMBOL(irda_device_txqueue_empty);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-01-13 22:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-13 22:42 [PATCH] IRDA device driver API 2.6 -> 2.4 backport Jens David
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).