hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/iio/adc/bcm_iproc_adc.c
....@@ -1,21 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright 2016 Broadcom
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License, version 2, as
6
- * published by the Free Software Foundation (the "GPL").
7
- *
8
- * This program is distributed in the hope that it will be useful, but
9
- * WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
- * General Public License version 2 (GPLv2) for more details.
12
- *
13
- * You should have received a copy of the GNU General Public License
14
- * version 2 (GPLv2) along with this source code.
154 */
165
176 #include <linux/module.h>
18
-#include <linux/of.h>
7
+#include <linux/mod_devicetable.h>
198 #include <linux/io.h>
209 #include <linux/clk.h>
2110 #include <linux/mfd/syscon.h>
....@@ -319,7 +308,7 @@
319308 "IntMask set failed. Read will likely fail.");
320309 read_len = -EIO;
321310 goto adc_err;
322
- };
311
+ }
323312 }
324313 regmap_read(adc_priv->regmap, IPROC_INTERRUPT_MASK, &val_check);
325314
....@@ -551,11 +540,8 @@
551540 }
552541
553542 adc_priv->irqno = platform_get_irq(pdev, 0);
554
- if (adc_priv->irqno <= 0) {
555
- dev_err(&pdev->dev, "platform_get_irq failed\n");
556
- ret = -ENODEV;
557
- return ret;
558
- }
543
+ if (adc_priv->irqno <= 0)
544
+ return -ENODEV;
559545
560546 ret = regmap_update_bits(adc_priv->regmap, IPROC_REGCTL2,
561547 IPROC_ADC_AUXIN_SCAN_ENA, 0);
....@@ -587,8 +573,6 @@
587573 }
588574
589575 indio_dev->name = "iproc-static-adc";
590
- indio_dev->dev.parent = &pdev->dev;
591
- indio_dev->dev.of_node = pdev->dev.of_node;
592576 indio_dev->info = &iproc_adc_iio_info;
593577 indio_dev->modes = INDIO_DIRECT_MODE;
594578 indio_dev->channels = iproc_adc_iio_channels;
....@@ -633,7 +617,7 @@
633617 .remove = iproc_adc_remove,
634618 .driver = {
635619 .name = "iproc-static-adc",
636
- .of_match_table = of_match_ptr(iproc_adc_of_match),
620
+ .of_match_table = iproc_adc_of_match,
637621 },
638622 };
639623 module_platform_driver(iproc_adc_driver);