hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/iio/dac/ti-dac082s085.c
....@@ -1,22 +1,20 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * ti-dac082s085.c - Texas Instruments 8/10/12-bit 2/4-channel DAC driver
34 *
45 * Copyright (C) 2017 KUNBUS GmbH
56 *
6
- * http://www.ti.com/lit/ds/symlink/dac082s085.pdf
7
- * http://www.ti.com/lit/ds/symlink/dac102s085.pdf
8
- * http://www.ti.com/lit/ds/symlink/dac122s085.pdf
9
- * http://www.ti.com/lit/ds/symlink/dac084s085.pdf
10
- * http://www.ti.com/lit/ds/symlink/dac104s085.pdf
11
- * http://www.ti.com/lit/ds/symlink/dac124s085.pdf
12
- *
13
- * This program is free software; you can redistribute it and/or modify
14
- * it under the terms of the GNU General Public License (version 2) as
15
- * published by the Free Software Foundation.
7
+ * https://www.ti.com/lit/ds/symlink/dac082s085.pdf
8
+ * https://www.ti.com/lit/ds/symlink/dac102s085.pdf
9
+ * https://www.ti.com/lit/ds/symlink/dac122s085.pdf
10
+ * https://www.ti.com/lit/ds/symlink/dac084s085.pdf
11
+ * https://www.ti.com/lit/ds/symlink/dac104s085.pdf
12
+ * https://www.ti.com/lit/ds/symlink/dac124s085.pdf
1613 */
1714
1815 #include <linux/iio/iio.h>
1916 #include <linux/module.h>
17
+#include <linux/mod_devicetable.h>
2018 #include <linux/regulator/consumer.h>
2119 #include <linux/spi/spi.h>
2220
....@@ -271,7 +269,6 @@
271269 if (!indio_dev)
272270 return -ENOMEM;
273271
274
- indio_dev->dev.parent = dev;
275272 indio_dev->info = &ti_dac_info;
276273 indio_dev->name = spi->modalias;
277274 indio_dev->modes = INDIO_DIRECT_MODE;
....@@ -328,7 +325,6 @@
328325 return 0;
329326 }
330327
331
-#ifdef CONFIG_OF
332328 static const struct of_device_id ti_dac_of_id[] = {
333329 { .compatible = "ti,dac082s085" },
334330 { .compatible = "ti,dac102s085" },
....@@ -339,7 +335,6 @@
339335 { }
340336 };
341337 MODULE_DEVICE_TABLE(of, ti_dac_of_id);
342
-#endif
343338
344339 static const struct spi_device_id ti_dac_spi_id[] = {
345340 { "dac082s085", dual_8bit },
....@@ -355,7 +350,7 @@
355350 static struct spi_driver ti_dac_driver = {
356351 .driver = {
357352 .name = "ti-dac082s085",
358
- .of_match_table = of_match_ptr(ti_dac_of_id),
353
+ .of_match_table = ti_dac_of_id,
359354 },
360355 .probe = ti_dac_probe,
361356 .remove = ti_dac_remove,