Lines Matching defs:p_lm70
59 struct lm70 *p_lm70 = dev_get_drvdata(&spi->dev);
61 if (mutex_lock_interruptible(&p_lm70->lock))
94 switch (p_lm70->chip) {
106 mutex_unlock(&p_lm70->lock);
115 struct lm70 *p_lm70 = dev_get_drvdata(dev);
118 switch (p_lm70->chip) {
138 struct lm70 *p_lm70;
151 p_lm70 = kzalloc(sizeof *p_lm70, GFP_KERNEL);
152 if (!p_lm70)
155 mutex_init(&p_lm70->lock);
156 p_lm70->chip = chip;
159 p_lm70->hwmon_dev = hwmon_device_register(&spi->dev);
160 if (IS_ERR(p_lm70->hwmon_dev)) {
162 status = PTR_ERR(p_lm70->hwmon_dev);
165 dev_set_drvdata(&spi->dev, p_lm70);
177 hwmon_device_unregister(p_lm70->hwmon_dev);
180 kfree(p_lm70);
186 struct lm70 *p_lm70 = dev_get_drvdata(&spi->dev);
190 hwmon_device_unregister(p_lm70->hwmon_dev);
192 kfree(p_lm70);