* [PATCH 1/2] iio: resolver: ad2s1210: remove DRV_NAME macro
2023-10-12 16:18 [PATCH 0/2] iio: resolver: ad2s1210: small cleanups David Lechner
@ 2023-10-12 16:18 ` David Lechner
2023-10-12 16:18 ` [PATCH 2/2] iio: resolver: ad2s1210: remove of_match_ptr() David Lechner
2023-10-14 12:54 ` [PATCH 0/2] iio: resolver: ad2s1210: small cleanups Jonathan Cameron
2 siblings, 0 replies; 4+ messages in thread
From: David Lechner @ 2023-10-12 16:18 UTC (permalink / raw)
To: linux-iio
Cc: David Lechner, Jonathan Cameron, Michael Hennerich, linux-kernel
The DRV_NAME macro is only used in one place in the ad2s1210 driver and
is not really needed so let's remove it.
Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/resolver/ad2s1210.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/iio/resolver/ad2s1210.c b/drivers/iio/resolver/ad2s1210.c
index bd4a90c222b5..00562bc542bb 100644
--- a/drivers/iio/resolver/ad2s1210.c
+++ b/drivers/iio/resolver/ad2s1210.c
@@ -68,8 +68,6 @@
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
-#define DRV_NAME "ad2s1210"
-
/* control register flags */
#define AD2S1210_ADDRESS_DATA BIT(7)
#define AD2S1210_PHASE_LOCK_RANGE_44 BIT(5)
@@ -1509,7 +1507,7 @@ MODULE_DEVICE_TABLE(spi, ad2s1210_id);
static struct spi_driver ad2s1210_driver = {
.driver = {
- .name = DRV_NAME,
+ .name = "ad2s1210",
.of_match_table = of_match_ptr(ad2s1210_of_match),
},
.probe = ad2s1210_probe,
--
2.42.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] iio: resolver: ad2s1210: remove of_match_ptr()
2023-10-12 16:18 [PATCH 0/2] iio: resolver: ad2s1210: small cleanups David Lechner
2023-10-12 16:18 ` [PATCH 1/2] iio: resolver: ad2s1210: remove DRV_NAME macro David Lechner
@ 2023-10-12 16:18 ` David Lechner
2023-10-14 12:54 ` [PATCH 0/2] iio: resolver: ad2s1210: small cleanups Jonathan Cameron
2 siblings, 0 replies; 4+ messages in thread
From: David Lechner @ 2023-10-12 16:18 UTC (permalink / raw)
To: linux-iio
Cc: David Lechner, Jonathan Cameron, Michael Hennerich, linux-kernel
To be consistent with the rest of iio, remove of_match_ptr(). It does
not do anything useful here.
Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/resolver/ad2s1210.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iio/resolver/ad2s1210.c b/drivers/iio/resolver/ad2s1210.c
index 00562bc542bb..1bd1b950e7cc 100644
--- a/drivers/iio/resolver/ad2s1210.c
+++ b/drivers/iio/resolver/ad2s1210.c
@@ -54,7 +54,6 @@
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/mutex.h>
-#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
@@ -1508,7 +1507,7 @@ MODULE_DEVICE_TABLE(spi, ad2s1210_id);
static struct spi_driver ad2s1210_driver = {
.driver = {
.name = "ad2s1210",
- .of_match_table = of_match_ptr(ad2s1210_of_match),
+ .of_match_table = ad2s1210_of_match,
},
.probe = ad2s1210_probe,
.id_table = ad2s1210_id,
--
2.42.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] iio: resolver: ad2s1210: small cleanups
2023-10-12 16:18 [PATCH 0/2] iio: resolver: ad2s1210: small cleanups David Lechner
2023-10-12 16:18 ` [PATCH 1/2] iio: resolver: ad2s1210: remove DRV_NAME macro David Lechner
2023-10-12 16:18 ` [PATCH 2/2] iio: resolver: ad2s1210: remove of_match_ptr() David Lechner
@ 2023-10-14 12:54 ` Jonathan Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2023-10-14 12:54 UTC (permalink / raw)
To: David Lechner; +Cc: linux-iio, Michael Hennerich, linux-kernel
On Thu, 12 Oct 2023 11:18:11 -0500
David Lechner <dlechner@baylibre.com> wrote:
> This series contains a few small cleanups for the ad2s1210 resolver
> driver following up from the previous series[1].
>
> [1] https://lore.kernel.org/linux-iio/20231012092522.27ef48dd@jic23-huawei
>
> ---
> David Lechner (2):
> iio: resolver: ad2s1210: remove DRV_NAME macro
> iio: resolver: ad2s1210: remove of_match_ptr()
>
> drivers/iio/resolver/ad2s1210.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
> ---
> base-commit: 291e45eeeb901b1d22b74ac5ea48cab3c407c705
> change-id: 20231012-ad2s1210-mainline-d80cc13acdce
>
> Best regards,
Applied. Thanks,
J
^ permalink raw reply [flat|nested] 4+ messages in thread