Lines Matching refs:lm
70 struct wf_lm87_sensor *lm = sr->priv; in wf_lm87_get() local
73 if (lm->i2c == NULL) in wf_lm87_get()
79 temp = wf_lm87_read_reg(lm->i2c, LM87_INT_TEMP); in wf_lm87_get()
89 struct wf_lm87_sensor *lm = wf_to_lm87(sr); in wf_lm87_release() local
91 kfree(lm); in wf_lm87_release()
103 struct wf_lm87_sensor *lm; in wf_lm87_probe() local
134 lm = kzalloc(sizeof(struct wf_lm87_sensor), GFP_KERNEL); in wf_lm87_probe()
135 if (lm == NULL) in wf_lm87_probe()
138 lm->i2c = client; in wf_lm87_probe()
139 lm->sens.name = name; in wf_lm87_probe()
140 lm->sens.ops = &wf_lm87_ops; in wf_lm87_probe()
141 lm->sens.priv = lm; in wf_lm87_probe()
142 i2c_set_clientdata(client, lm); in wf_lm87_probe()
144 rc = wf_register_sensor(&lm->sens); in wf_lm87_probe()
146 kfree(lm); in wf_lm87_probe()
152 struct wf_lm87_sensor *lm = i2c_get_clientdata(client); in wf_lm87_remove() local
154 DBG("wf_lm87: i2c detatch called for %s\n", lm->sens.name); in wf_lm87_remove()
157 lm->i2c = NULL; in wf_lm87_remove()
160 wf_unregister_sensor(&lm->sens); in wf_lm87_remove()