[flashrom] Improving pcidev.c

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Sun Jan 6 00:54:22 CET 2013


Am 05.01.2013 23:45 schrieb Stefan Tauner:
>> > Updated patch: Fix a compile failure with disabled internal programmer.
>> > We were using a struct before declaring it first, so comapred to the
>> > previous patch this is only some code rearranging in programmer.h.
>> > 
>> > Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
> looks good enough to me to commit it ;)
> Acked-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>

Thanks a lot for the review.

Changelog:
Decouple BAR reading from pci device init, handle errors gracefully.

pcidev_init() now returns struct pci_device * instead of a BAR stored in
PCI config space. This allows for real error checking instead of having
exit(1) everywhere in pcidev.c.
Thanks to Niklas Söderlund for coming up with the original error
handling patch which was slightly modified and folded into this patch.
Move the declaration of struct pci_device in programmer.h before the
first user.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Acked-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>

Committed in r1644.

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list