From: Frank Mori Hess Date: Sat, 28 Jan 2006 21:27:42 +0000 (+0000) Subject: More compatilbility wrappers to let ni_atmio driver using 2.6 isapnp X-Git-Tag: r0_7_71~62 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=49177264a6e6237b893f2e90c88e5a5a9d86fca4;p=comedi.git More compatilbility wrappers to let ni_atmio driver using 2.6 isapnp support compile (but isapnp won't actually work) on 2.4 kernels. --- diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h new file mode 100644 index 00000000..6889465f --- /dev/null +++ b/include/linux/isapnp.h @@ -0,0 +1,33 @@ +/* + Kernel compatibility header file + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef _ISAPNP_COMPAT_H +#define _ISAPNP_COMPAT_H + +#include_next + +#include + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) +#include +#define pnp_find_dev(...) NULL +#define pnp_find_dev(...) NULL +#endif + +#endif // _ISAPNP_COMPAT_H diff --git a/include/linux/pnp.h b/include/linux/pnp.h index d805f0b6..b5515b22 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h @@ -31,7 +31,6 @@ #include struct pnp_protocol; -struct pnp_dev; struct pnp_card; struct pnp_irq; struct pnp_dma; @@ -41,6 +40,10 @@ struct pnp_resource_table; struct pnp_id; struct pnp_card_link; struct pnp_card_driver; +struct pnp_dev +{ + struct pnp_card * card; +}; struct pnp_driver { char * name; const struct pnp_device_id *id_table; @@ -91,6 +94,11 @@ static inline int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev) { return -E static inline int pnp_register_driver(struct pnp_driver *drv) { return -ENODEV; } static inline void pnp_unregister_driver(struct pnp_driver *drv) { ; } +#define pnp_port_valid(dev, bar) (0) +#define pnp_irq_valid(dev, bar) (0) +#define pnp_irq(dev, bar) (0) +#define pnp_port_start(dev,bar) (0) + #else #include_next #endif