[flashrom] [PATCH 1/5] Let pcidev clean itself up.

Stefan Tauner stefan.tauner at student.tuwien.ac.at
Wed Jan 2 15:29:47 CET 2013


On Wed, 02 Jan 2013 02:06:44 +0100
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net> wrote:

> > diff --git a/nicrealtek.c b/nicrealtek.c
> > index 3c3b261..0929e5d 100644
> > --- a/nicrealtek.c
> > +++ b/nicrealtek.c
> > @@ -51,22 +51,25 @@ static const struct par_programmer par_programmer_nicrealtek = {
> >  		.chip_writen		= fallback_chip_writen,
> >  };
> >  
> > +#if 0
> >  static int nicrealtek_shutdown(void *data)
> >  {
> >  	/* FIXME: We forgot to disable software access again. */
> > -	pci_cleanup(pacc);
> >  	return 0;
> >  }
> > +#endif
> >  
> >  int nicrealtek_init(void)
> >  {
> >  	if (rget_io_perms())
> >  		return 1;
> >  
> > +	/* No need to check for errors, pcidev_init() will not return in case of errors. */
> >  	io_base_addr = pcidev_init(PCI_BASE_ADDRESS_0, nics_realtek);
> > -
> > +#if 0
> >  	if (register_shutdown(nicrealtek_shutdown, NULL))
> >  		return 1;
> > +#endif
> >  
> >  	/* Beware, this ignores the vendor ID! */
> >  	switch (pcidev_dev->device_id) {  
> 
> Please remove the #if 0 in the hunks above. It's not performance critical.

BTW Do you understand the FIXME? I dont and I dont see where we enabled
access in the first place...!?

-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner




More information about the flashrom mailing list