]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pwm: lpss: Do not export board infos for different PWM types
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sat, 28 Jan 2017 15:10:43 +0000 (17:10 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 30 Jan 2017 07:16:55 +0000 (08:16 +0100)
The PWM LPSS probe drivers just pass a pointer to the exported board
info structures to pwm_lpss_probe() based on device PCI or ACPI ID.

In order to remove the knowledge of specific devices from library part of
the driver and reduce noise in exported namespace just duplicate the
board info structures and stop exporting them.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-lpss-pci.c
drivers/pwm/pwm-lpss-platform.c
drivers/pwm/pwm-lpss.c
drivers/pwm/pwm-lpss.h

index 3622f093490e73cdc1133978e9314861e76aadd5..2e7a9a48060da4106a31c2d7ad09c62a3a909fe9 100644 (file)
 
 #include "pwm-lpss.h"
 
+/* BayTrail */
+static const struct pwm_lpss_boardinfo pwm_lpss_byt_info = {
+       .clk_rate = 25000000,
+       .npwm = 1,
+       .base_unit_bits = 16,
+};
+
+/* Braswell */
+static const struct pwm_lpss_boardinfo pwm_lpss_bsw_info = {
+       .clk_rate = 19200000,
+       .npwm = 1,
+       .base_unit_bits = 16,
+};
+
+/* Broxton */
+static const struct pwm_lpss_boardinfo pwm_lpss_bxt_info = {
+       .clk_rate = 19200000,
+       .npwm = 4,
+       .base_unit_bits = 22,
+};
+
 static int pwm_lpss_probe_pci(struct pci_dev *pdev,
                              const struct pci_device_id *id)
 {
index 54433fc6d1a4e491e9e046b20558e093d7c5c4de..b22b6fdadb9ae14e0e55f28ecbfcece7e971eb1f 100644 (file)
 
 #include "pwm-lpss.h"
 
+/* BayTrail */
+static const struct pwm_lpss_boardinfo pwm_lpss_byt_info = {
+       .clk_rate = 25000000,
+       .npwm = 1,
+       .base_unit_bits = 16,
+};
+
+/* Braswell */
+static const struct pwm_lpss_boardinfo pwm_lpss_bsw_info = {
+       .clk_rate = 19200000,
+       .npwm = 1,
+       .base_unit_bits = 16,
+};
+
+/* Broxton */
+static const struct pwm_lpss_boardinfo pwm_lpss_bxt_info = {
+       .clk_rate = 19200000,
+       .npwm = 4,
+       .base_unit_bits = 22,
+};
+
 static int pwm_lpss_probe_platform(struct platform_device *pdev)
 {
        const struct pwm_lpss_boardinfo *info;
index 46670276690d46ad063d5970dae8b8a641227453..689d2c1cbead80f5b6540dac13f1f0e56edfecfa 100644 (file)
@@ -38,30 +38,6 @@ struct pwm_lpss_chip {
        const struct pwm_lpss_boardinfo *info;
 };
 
-/* BayTrail */
-const struct pwm_lpss_boardinfo pwm_lpss_byt_info = {
-       .clk_rate = 25000000,
-       .npwm = 1,
-       .base_unit_bits = 16,
-};
-EXPORT_SYMBOL_GPL(pwm_lpss_byt_info);
-
-/* Braswell */
-const struct pwm_lpss_boardinfo pwm_lpss_bsw_info = {
-       .clk_rate = 19200000,
-       .npwm = 1,
-       .base_unit_bits = 16,
-};
-EXPORT_SYMBOL_GPL(pwm_lpss_bsw_info);
-
-/* Broxton */
-const struct pwm_lpss_boardinfo pwm_lpss_bxt_info = {
-       .clk_rate = 19200000,
-       .npwm = 4,
-       .base_unit_bits = 22,
-};
-EXPORT_SYMBOL_GPL(pwm_lpss_bxt_info);
-
 static inline struct pwm_lpss_chip *to_lpwm(struct pwm_chip *chip)
 {
        return container_of(chip, struct pwm_lpss_chip, chip);
index 04766e0d41aab2a4b503c56d35fff4ba4c02778e..c94cd7c2695da72181830f35d52c2ce12c6afc18 100644 (file)
@@ -24,10 +24,6 @@ struct pwm_lpss_boardinfo {
        unsigned long base_unit_bits;
 };
 
-extern const struct pwm_lpss_boardinfo pwm_lpss_byt_info;
-extern const struct pwm_lpss_boardinfo pwm_lpss_bsw_info;
-extern const struct pwm_lpss_boardinfo pwm_lpss_bxt_info;
-
 struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r,
                                     const struct pwm_lpss_boardinfo *info);
 int pwm_lpss_remove(struct pwm_lpss_chip *lpwm);