diff mbox series

phy: ti: Fix compilation failures without REGMAP

Message ID 20190107174753.GA4051@ziepe.ca
State Superseded
Delegated to: David Miller
Headers show
Series phy: ti: Fix compilation failures without REGMAP | expand

Commit Message

Jason Gunthorpe Jan. 7, 2019, 5:48 p.m. UTC
This driver requires regmap or the compile fails:

drivers/phy/ti/phy-gmii-sel.c:43:27: error: array type has incomplete element type ‘struct reg_field’
  const struct reg_field (*regfields)[PHY_GMII_SEL_LAST];

Add it to kconfig.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 drivers/phy/ti/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Andrew Lunn Jan. 7, 2019, 6:13 p.m. UTC | #1
On Mon, Jan 07, 2019 at 05:48:00PM +0000, Jason Gunthorpe wrote:
> This driver requires regmap or the compile fails:
> 
> drivers/phy/ti/phy-gmii-sel.c:43:27: error: array type has incomplete element type ‘struct reg_field’
>   const struct reg_field (*regfields)[PHY_GMII_SEL_LAST];
> 
> Add it to kconfig.

Hi Jason

It looks like more of the TI drivers need REGMAP, but don't select it.
I assume you are using COMPILE_TEST, since TI_CPSW selects REGMAP?

  Andrew
Jason Gunthorpe Jan. 7, 2019, 6:17 p.m. UTC | #2
On Mon, Jan 07, 2019 at 07:13:00PM +0100, Andrew Lunn wrote:
> On Mon, Jan 07, 2019 at 05:48:00PM +0000, Jason Gunthorpe wrote:
> > This driver requires regmap or the compile fails:
> > 
> > drivers/phy/ti/phy-gmii-sel.c:43:27: error: array type has incomplete element type ‘struct reg_field’
> >   const struct reg_field (*regfields)[PHY_GMII_SEL_LAST];
> > 
> > Add it to kconfig.
> 
> Hi Jason
> 
> It looks like more of the TI drivers need REGMAP, but don't select it.
> I assume you are using COMPILE_TEST, since TI_CPSW selects REGMAP?

Yes, this causes COMPILE_TEST kernels to fail.

Jason
diff mbox series

Patch

diff --git a/drivers/phy/ti/Kconfig b/drivers/phy/ti/Kconfig
index f137e010776463..c4709ed7fb0e72 100644
--- a/drivers/phy/ti/Kconfig
+++ b/drivers/phy/ti/Kconfig
@@ -82,6 +82,7 @@  config PHY_TI_GMII_SEL
 	default y if TI_CPSW=y
 	depends on TI_CPSW || COMPILE_TEST
 	select GENERIC_PHY
+	select REGMAP
 	default m
 	help
 	  This driver supports configuring of the TI CPSW Port mode depending on