On Sunday 20 January 2008, Rafael J. Wysocki wrote:
> > Nah, please don't obfuscate the code.
> > Better add a flag to struct b43_wldev and check that in the few places
> > that need different behaviour.
> 
> I can do that, if you prefer, but that will look worse, IMHO.

I'm pretty sure it won't. We had such a flag in the past for firmware.
(Fixed that differently now).
You simply have do do dev->suspending = 1; at the beginning of suspend/resume
and dev->suspending = 0; at the end. The if() checks in the code remain the 
same.
The only thing that this approach won't do it clutter the (already hard
to understand) interface up/down API. And that is good. We already have
enough special cases for this stuff due to device weirdness. Let's not make it 
worse.
I had a hard time to make a sane API for this (look at bcm43xx to compare to
the old crap that doesn't work on lots of devices. ;) )

Thanks for doing this patch.
_______________________________________________
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev

Reply via email to