Lines Matching refs:max
49 struct wf_6690_sensor *max = wf_to_6690(sr);
52 if (max->i2c.adapter == NULL)
56 data = i2c_smbus_read_byte_data(&max->i2c, MAX6690_EXTERNAL_TEMP);
65 struct wf_6690_sensor *max = wf_to_6690(sr);
67 if (max->i2c.adapter) {
68 i2c_detach_client(&max->i2c);
69 max->i2c.adapter = NULL;
71 kfree(max);
82 struct wf_6690_sensor *max;
85 max = kzalloc(sizeof(struct wf_6690_sensor), GFP_KERNEL);
86 if (max == NULL) {
92 max->sens.ops = &wf_max6690_ops;
93 max->sens.name = name;
94 max->i2c.addr = addr >> 1;
95 max->i2c.adapter = adapter;
96 max->i2c.driver = &wf_max6690_driver;
97 strncpy(max->i2c.name, name, I2C_NAME_SIZE-1);
99 if (i2c_attach_client(&max->i2c)) {
104 if (wf_register_sensor(&max->sens)) {
105 i2c_detach_client(&max->i2c);
112 kfree(max);
151 struct wf_6690_sensor *max = i2c_to_6690(client);
153 max->i2c.adapter = NULL;
154 wf_unregister_sensor(&max->sens);