static int wf_max6690_remove(struct i2c_client *client) { struct wf_6690_sensor *max = i2c_get_clientdata(client); max->i2c = NULL; wf_unregister_sensor(&max->sens); return 0; }
static int wf_lm75_remove(struct i2c_client *client) { struct wf_lm75_sensor *lm = i2c_get_clientdata(client); DBG("wf_lm75: i2c detatch called for %s\n", lm->sens.name); /* Mark client detached */ lm->i2c = NULL; /* release sensor */ wf_unregister_sensor(&lm->sens); return 0; }
static int wf_sat_remove(struct i2c_client *client) { struct wf_sat *sat = i2c_get_clientdata(client); struct wf_sat_sensor *sens; /* release sensors */ while(!list_empty(&sat->sensors)) { sens = list_first_entry(&sat->sensors, struct wf_sat_sensor, link); list_del(&sens->link); wf_unregister_sensor(&sens->sens); } sat->i2c = NULL; kref_put(&sat->ref, wf_sat_release); return 0; }