-/* This function is called when:
- * lm78_driver is inserted (when this module is loaded), for each
- available adapter
- * when a new adapter is inserted (and lm78_driver is still present)
- We block updates of the ISA device to minimize the risk of concurrent
- access to the same LM78 chip through different interfaces. */
-static int lm78_attach_adapter(struct i2c_adapter *adapter)
-{
- struct lm78_data *data;
- int err;
-
- if (!(adapter->class & I2C_CLASS_HWMON))
- return 0;
-
- data = pdev ? platform_get_drvdata(pdev) : NULL;
- if (data)
- mutex_lock(&data->update_lock);
- err = i2c_probe(adapter, &addr_data, lm78_detect);
- if (data)
- mutex_unlock(&data->update_lock);
- return err;
-}
-