lkml.org 
[lkml]   [2021]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 13/23] counter: Provide alternative counter registration functions
On Wed, Dec 29, 2021 at 03:49:29PM +0200, Jarkko Nikula wrote:
> On 12/28/21 20:00, Jonathan Cameron wrote:
> > On Mon, 27 Dec 2021 10:45:16 +0100
> > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > > + if (err < 0)
> > > + goto err_chrdev_add;
> > > +
> > > + device_initialize(dev);
> > > + /* Configure device structure for Counter */
> > > + dev->type = &counter_device_type;
> > > + dev->bus = &counter_bus_type;
> > > + dev->devt = MKDEV(MAJOR(counter_devt), id);
> >
> > As 0-day pointed out id not initialized.
> >
> This was the reason why second counter instance initialization failed for me
> when testing the patch 17. I fixed it locally by changing the line a few
> rows above the MKDEV():
>
> - dev->id = err;
> + dev->id = id = err;

Instead I dropped id for v3. I failed to check this mailthread again
before sending it out. So I missed your feedback. I will go through it
again and comment later.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-12-29 16:48    [W:0.126 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site