Lines Matching refs:lm
68 struct wf_lm87_sensor *lm = sr->priv; in wf_lm87_get() local
71 if (lm->i2c == NULL) in wf_lm87_get()
77 temp = wf_lm87_read_reg(lm->i2c, LM87_INT_TEMP); in wf_lm87_get()
87 struct wf_lm87_sensor *lm = wf_to_lm87(sr); in wf_lm87_release() local
89 kfree(lm); in wf_lm87_release()
101 struct wf_lm87_sensor *lm; in wf_lm87_probe() local
132 lm = kzalloc(sizeof(struct wf_lm87_sensor), GFP_KERNEL); in wf_lm87_probe()
133 if (lm == NULL) in wf_lm87_probe()
136 lm->i2c = client; in wf_lm87_probe()
137 lm->sens.name = name; in wf_lm87_probe()
138 lm->sens.ops = &wf_lm87_ops; in wf_lm87_probe()
139 lm->sens.priv = lm; in wf_lm87_probe()
140 i2c_set_clientdata(client, lm); in wf_lm87_probe()
142 rc = wf_register_sensor(&lm->sens); in wf_lm87_probe()
144 kfree(lm); in wf_lm87_probe()
150 struct wf_lm87_sensor *lm = i2c_get_clientdata(client); in wf_lm87_remove() local
153 lm->i2c = NULL; in wf_lm87_remove()
156 wf_unregister_sensor(&lm->sens); in wf_lm87_remove()