On Tue, Jun 20, 2017 at 06:32:49PM +0200, Greg Kurz wrote:
> On Tue, 20 Jun 2017 09:53:29 +0800
> David Gibson <da...@gibson.dropbear.id.au> wrote:
> 
> > DRC objects have a regular device reset method.  However, it only gets
> > called in the usual way for PCI DRCs.  Because of where CPU and LMB DRCs
> > are in the QOM tree, their device reset method isn't automatically called.
> > So, the machine manually registers reset handlers to call device_reset().
> > 
> > This patch removes the device reset method, and instead always explicitly
> > registers the reset handler from realize().  This means the callers don't
> > have to worry about the two cases, and we always get proper resets.
> > 
> > Signed-off-by: David Gibson <da...@gibson.dropbear.id.au>
> > ---
> 
> This indeed simplifies the code. It also has the interesting effect that
> nobody cares for the return value of spapr_dr_connector_new()
> anymore.

True.  I think I'll leave it there for now, though, since *_new()
functions generally return the object they created.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature

Reply via email to