spi: Drop owner assignment from spi_drivers
[linux-2.6/btrfs-unstable.git] / sound / soc / codecs / wm8804-spi.c
blob9998c78a2325a2c717aa15eb14e65270f64a5116
1 /*
2 * wm8804-spi.c -- WM8804 S/PDIF transceiver driver - SPI
4 * Copyright 2015 Cirrus Logic Inc
6 * Author: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #include <linux/init.h>
14 #include <linux/module.h>
15 #include <linux/spi/spi.h>
17 #include "wm8804.h"
19 static int wm8804_spi_probe(struct spi_device *spi)
21 struct regmap *regmap;
23 regmap = devm_regmap_init_spi(spi, &wm8804_regmap_config);
24 if (IS_ERR(regmap))
25 return PTR_ERR(regmap);
27 return wm8804_probe(&spi->dev, regmap);
30 static int wm8804_spi_remove(struct spi_device *spi)
32 wm8804_remove(&spi->dev);
33 return 0;
36 static const struct of_device_id wm8804_of_match[] = {
37 { .compatible = "wlf,wm8804", },
38 { }
40 MODULE_DEVICE_TABLE(of, wm8804_of_match);
42 static struct spi_driver wm8804_spi_driver = {
43 .driver = {
44 .name = "wm8804",
45 .pm = &wm8804_pm,
46 .of_match_table = wm8804_of_match,
48 .probe = wm8804_spi_probe,
49 .remove = wm8804_spi_remove
52 module_spi_driver(wm8804_spi_driver);
54 MODULE_DESCRIPTION("ASoC WM8804 driver - SPI");
55 MODULE_AUTHOR("Charles Keepax <ckeepax@opensource.wolfsonmicro.com>");
56 MODULE_LICENSE("GPL");