Beispiel #1
0
int __init i2c_bitelv_init(void)
{
	printk("i2c-elv.o: i2c ELV parallel port adapter module\n");
	if (base==0) {
		/* probe some values */
		base=DEFAULT_BASE;
		bit_elv_data.data=(void*)DEFAULT_BASE;
		if (bit_elv_init()==0) {
			if(i2c_bit_add_bus(&bit_elv_ops) < 0)
				return -ENODEV;
		} else {
			return -ENODEV;
		}
	} else {
		bit_elv_ops.data=(void*)base;
		if (bit_elv_init()==0) {
			if(i2c_bit_add_bus(&bit_elv_ops) < 0)
				return -ENODEV;
		} else {
			return -ENODEV;
		}
	}
	printk("i2c-elv.o: found device at %#x.\n",base);
	return 0;
}
Beispiel #2
0
int __init i2c_bitelv_init(void)
{
	printk(KERN_INFO "i2c-elv.o: i2c ELV parallel port adapter module version %s (%s)\n", I2C_VERSION, I2C_DATE);
	if (base==0) {
		/* probe some values */
		base=DEFAULT_BASE;
		bit_elv_data.data=(void*)DEFAULT_BASE;
		if (bit_elv_init()==0) {
			if(i2c_bit_add_bus(&bit_elv_ops) < 0)
				return -ENODEV;
		} else {
			return -ENODEV;
		}
	} else {
		bit_elv_ops.data=(void*)base;
		if (bit_elv_init()==0) {
			if(i2c_bit_add_bus(&bit_elv_ops) < 0)
				return -ENODEV;
		} else {
			return -ENODEV;
		}
	}
	printk(KERN_DEBUG "i2c-elv.o: found device at %#x.\n",base);
	return 0;
}