Re: [PATCH -next] regmap: add structs to fix build warnings whenREGMAP is not enabled

From: Mark Brown
Date: Sun Mar 11 2012 - 07:58:05 EST


On Fri, Mar 09, 2012 at 11:31:57AM -0800, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
>
> Fix build warnings when CONFIG_REGMAP is not enabled by providing
> struct forward references.

This isn't a great approach - you've put the forward declarations into
the ifdef which is at best needless (if they conflict with anything real
something went badly wrong) and for the register defaults the chances
are anything actually trying to use that stub needs to know about the
definition so the ifdef should be pulled further down the function.

I've done something better.

Attachment: signature.asc
Description: Digital signature