Re: [PATCH] fpga: altera-hps2fpga: do not request reset by index
From: Xu Yilun
Date: Sat Nov 14 2026 - 07:36:10 EST
On Mon, Nov 09, 2026 at 08:54:59AM +0100, Philipp Zabel wrote:
> On Sa, 2026-11-07 at 20:00 +0800, Xu Yilun wrote:
> > On Fri, Nov 06, 2026 at 04:43:19PM +0100, Philipp Zabel wrote:
> > > There is no need to request a single reset by index.
> > > Use of_reset_control_get_exclusive() to request the first and only
> > > reset.
> > >
> > > Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
> > > ---
> > > drivers/fpga/altera-hps2fpga.c | 3 +--
> > > 1 file changed, 1 insertion(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/fpga/altera-hps2fpga.c b/drivers/fpga/altera-hps2fpga.c
> > > index f2f1250689cb..9b7f5b8191b8 100644
> > > --- a/drivers/fpga/altera-hps2fpga.c
> > > +++ b/drivers/fpga/altera-hps2fpga.c
> > > @@ -134,8 +134,7 @@ static int alt_fpga_bridge_probe(struct platform_device *pdev)
> > >
> > > priv = (struct altera_hps2fpga_data *)device_get_match_data(dev);
> > >
> > > - priv->bridge_reset = of_reset_control_get_exclusive_by_index(dev->of_node,
> > > - 0);
> > > + priv->bridge_reset = of_reset_control_get_exclusive(dev->of_node, NULL);
> >
> > Saved a 0 arg but add a NULL arg, Any benifit to justify the code churn?
>
> I'd like to remove the _by_index() API once there are no users left.
Then you need to show your intent by having a series that includes both
the changes to the users and the removal of the API.
> For a while now, these functions are only ever called with index == 0.
>
> regards
> Philipp