Message ID | 20240816-pwm-axi-pwmgen-use-shared-macro-v1-1-994153ebc3a7@baylibre.com |
---|---|
State | Accepted |
Headers | show |
Series | pwm: axi-pwmgen: use shared macro for version reg | expand |
Hello David, On Fri, Aug 16, 2024 at 12:30:58PM -0500, David Lechner wrote: > The linux/fpga/adi-axi-common.h header already defines a macro for the > version register offset. Use this macro in the axi-pwmgen driver instead > of defining it again. > > Signed-off-by: David Lechner <dlechner@baylibre.com> Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next . Thanks Uwe
diff --git a/drivers/pwm/pwm-axi-pwmgen.c b/drivers/pwm/pwm-axi-pwmgen.c index 3ad60edf20a5..b5477659ba18 100644 --- a/drivers/pwm/pwm-axi-pwmgen.c +++ b/drivers/pwm/pwm-axi-pwmgen.c @@ -29,7 +29,6 @@ #include <linux/regmap.h> #include <linux/slab.h> -#define AXI_PWMGEN_REG_CORE_VERSION 0x00 #define AXI_PWMGEN_REG_ID 0x04 #define AXI_PWMGEN_REG_SCRATCHPAD 0x08 #define AXI_PWMGEN_REG_CORE_MAGIC 0x0C @@ -145,7 +144,7 @@ static int axi_pwmgen_setup(struct regmap *regmap, struct device *dev) "failed to read expected value from register: got %08x, expected %08x\n", val, AXI_PWMGEN_REG_CORE_MAGIC_VAL); - ret = regmap_read(regmap, AXI_PWMGEN_REG_CORE_VERSION, &val); + ret = regmap_read(regmap, ADI_AXI_REG_VERSION, &val); if (ret) return ret;
The linux/fpga/adi-axi-common.h header already defines a macro for the version register offset. Use this macro in the axi-pwmgen driver instead of defining it again. Signed-off-by: David Lechner <dlechner@baylibre.com> --- drivers/pwm/pwm-axi-pwmgen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- base-commit: 861a4272660ac0ff51aa4e2dbfbc3276c06b35eb change-id: 20240816-pwm-axi-pwmgen-use-shared-macro-939074f41d2f Best regards,