/* Copyright 1999 Red Hat, Inc. * * This software may be freely redistributed under the terms of the GNU * public license. * * 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. * */ #include "isapnp.h" /* I am in hell. ISAPnP is the fifth circle. */ /* Default to new-style access. */ static int access_type = 1; /* Needed for old access */ static int readport = 0; static void isapnpFreeDevice(struct isapnpDevice *dev) { freeDevice((struct device *)dev); /* needs finished */ } static void isapnpWriteDevice(FILE *file, struct isapnpDevice *dev) { writeDevice(file, (struct device *)dev); /* needs finished */ } static int isapnpCompareDevice(struct isapnpDevice *dev1, struct isapnpDevice *dev2) { int x=compareDevice((struct device *)dev1,(struct device *)dev2); if (x) return x; return devCmp( (void *)dev1, (void *)dev2 ); /* needs finished */ } struct isapnpDevice * isapnpNewDevice(struct isapnpDevice *dev) { struct isapnpDevice *ret; ret = malloc(sizeof(struct isapnpDevice)); memset(ret,'\0',sizeof(struct isapnpDevice)); ret=(struct isapnpDevice *)newDevice((struct device *)dev,(struct device *)ret); ret->bus = BUS_ISAPNP; if (dev && dev->bus == BUS_isapnp) { ret->vendorId = dev->vendorId; ret->deviceId = dev->deviceId; } ret->newDevice = isapnpNewDevice; ret->freeDevice = isapnpFreeDevice; ret->writeDevice = isapnpWriteDevice; ret->compareDevice = isapnpCompareDevice; return ret; } struct device * isapnpProbe(enum deviceClass probeClass, int probeFlags, struct device *devlist) { return devlist; }