2019-03-16 01:53:12

by Axel Lin

[permalink] [raw]
Subject: [PATCH] regulator: da9052: Include linux/of.h to fix build warning for of_match_ptr

Remove #ifdef CONFIG_OF guard so linux/of.h will be included when
!CONFIG_OF. This fixes build warnings when !CONFIG_OF.

Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Axel Lin <[email protected]>
---
drivers/regulator/da9052-regulator.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index cefa3558236d..d272cd040f79 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -19,10 +19,8 @@
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
-#ifdef CONFIG_OF
#include <linux/of.h>
#include <linux/regulator/of_regulator.h>
-#endif

#include <linux/mfd/da9052/da9052.h>
#include <linux/mfd/da9052/reg.h>
--
2.17.1



2019-03-18 11:56:46

by Steve Twiss

[permalink] [raw]
Subject: RE: [PATCH] regulator: da9052: Include linux/of.h to fix build warning for of_match_ptr

Hi Axel,

On 16 March 2019 01:51, Axel Lin wrote:

> To: Mark Brown <[email protected]>
> Subject: [PATCH] regulator: da9052: Include linux/of.h to fix build warning for
> of_match_ptr
>
> Remove #ifdef CONFIG_OF guard so linux/of.h will be included when
> !CONFIG_OF. This fixes build warnings when !CONFIG_OF.
>
> Reported-by: kbuild test robot <[email protected]>
> Signed-off-by: Axel Lin <[email protected]>

Thanks!

Acked-by: Steve Twiss <[email protected]>

Regards,
Steve