[sane-devel] Add function sanei_usb_get_endpoint

m. allan noah kitno455 at gmail.com
Mon Jan 31 20:42:04 UTC 2011


I will not complain if you commit, but I don't understand the point.
You are not saving any cycles when you look up the value instead of
just setting it. It's the same switch(), touching the same variable.
Plus, if you DO decide you need to change it, you now have to call a
second function. Your code now does more operations, not less.

allan

On Mon, Jan 31, 2011 at 3:31 PM, Reinhold Kainhofer
<reinhold at kainhofer.com> wrote:
> Since we now have the possibility to change the endpoint used for a particular
> USB communication type, we also need a way to retrieve the current endpoint,
> so that one can e.g. decide whether a switch to a different endpoint is needed
> at all, or reset the endpoint to the old value after a single usb operation on
> a different endpoint.
>
> Attached is a simple patch that adds this function sanei_usb_get_endpoint to
> sanei/, plus a range check in sanei_usb_set_endpoint. Okay to push to master
> or does that already violate the feature freeze?
>
> Cheers,
> Reinhold
> --
> ------------------------------------------------------------------
> Reinhold Kainhofer, reinhold at kainhofer.com, http://reinhold.kainhofer.com/
>  * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
>  * http://www.fam.tuwien.ac.at/, DVR: 0005886
>  * LilyPond, Music typesetting, http://www.lilypond.org
>
> --
> sane-devel mailing list: sane-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
>             to sane-devel-request at lists.alioth.debian.org
>



-- 
"The truth is an offense, but not a sin"



More information about the sane-devel mailing list