map->work_buf = kmalloc(map->format.buf_size, GFP_KERNEL);
if (map->work_buf == NULL) {
ret = -ENOMEM;
- goto err_bus;
+ goto err_map;
}
+ regmap_debugfs_init(map);
+
return map;
-err_bus:
- module_put(map->bus->owner);
err_map:
kfree(map);
err:
*/
void regmap_exit(struct regmap *map)
{
+ regmap_debugfs_exit(map);
kfree(map->work_buf);
- module_put(map->bus->owner);
kfree(map);
}
EXPORT_SYMBOL_GPL(regmap_exit);
enum wm8994_type type;
struct device *dev;
- int (*read_dev)(struct wm8994 *wm8994, unsigned short reg,
- int bytes, void *dest);
- int (*write_dev)(struct wm8994 *wm8994, unsigned short reg,
- int bytes, const void *src);
-
- void *control_data;
+ struct regmap *regmap;
+ bool ldo_ena_always_driven;
+
int gpio_base;
int irq_base;