Re: [PATCH 3/4] device property: Add iomap to fwnode operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rob,

Thanks for the review.

On Fri, Feb 11, 2022 at 09:59:42AM -0600, Rob Herring wrote:
> On Sun, Feb 06, 2022 at 11:16:42AM +0200, Sakari Ailus wrote:
> > Add iomap() fwnode operation to implement fwnode_iomap() through fwnode
> > operations, moving the code in fwnode_iomap() to OF framework.
> > 
> > Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> > ---
> >  drivers/base/property.c | 5 +----
> >  drivers/of/property.c   | 7 +++++++
> >  include/linux/fwnode.h  | 1 +
> >  3 files changed, 9 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/base/property.c b/drivers/base/property.c
> > index 09686e2e903e..83dd22e7cb81 100644
> > --- a/drivers/base/property.c
> > +++ b/drivers/base/property.c
> > @@ -887,10 +887,7 @@ EXPORT_SYMBOL_GPL(device_get_phy_mode);
> >   */
> >  void __iomem *fwnode_iomap(struct fwnode_handle *fwnode, int index)
> >  {
> > -	if (IS_ENABLED(CONFIG_OF_ADDRESS) && is_of_node(fwnode))
> > -		return of_iomap(to_of_node(fwnode), index);
> > -
> > -	return NULL;
> > +	return fwnode_call_ptr_op(fwnode, iomap, index);
> >  }
> >  EXPORT_SYMBOL(fwnode_iomap);
> >  
> > diff --git a/drivers/of/property.c b/drivers/of/property.c
> > index 676899566f7c..8beb89709740 100644
> > --- a/drivers/of/property.c
> > +++ b/drivers/of/property.c
> > @@ -1465,6 +1465,12 @@ static int of_link_property(struct device_node *con_np, const char *prop_name)
> >  	return 0;
> >  }
> >  
> > +static void __iomem *of_fwnode_iomap(struct fwnode_handle *fwnode, int index)
> > +{
> > +	return IS_ENABLED(CONFIG_OF_ADDRESS) ?
> 
> I think this shouldn't be needed. !OF_ADDRESS is Sparc which just has 
> its own implementation of of_iomap().

I'll drop it for v2.

-- 
Sakari Ailus



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux