>Number: 157070 >Category: kern >Synopsis: Improve API description in gpio_if.m >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun May 15 18:00:21 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Henrik Brix Andersen >Release: FreeBSD 9.0-CURRENT i386 >Organization: >Environment: System: FreeBSD drpepper.brixandersen.dk 9.0-CURRENT FreeBSD 9.0-CURRENT #3 r221961: Sun May 15 17:11:34 CEST 2011 r...@drpepper.brixandersen.dk:/usr/obj/usr/home/brix/projects/freebsd/src/head/sys/GENERIC i386
>Description: The API description for the GPIO_PIN_MAX() method is misleading. The function should provide the maximum supported pin_num, not the total number of pins. Most (if not all) in-tree GPIO drivers already name the second argument to this function 'maxpin', which seems less confusing. >How-To-Repeat: >Fix: The following patch improves the API description and renames the second argument to better reflect the intent. --- gpio_if.m.diff begins here --- Index: sys/dev/gpio/gpio_if.m =================================================================== --- sys/dev/gpio/gpio_if.m (revision 221961) +++ sys/dev/gpio/gpio_if.m (working copy) @@ -32,11 +32,11 @@ INTERFACE gpio; # -# Get total number of pins +# Get the maximum pin_num # METHOD int pin_max { device_t dev; - int *npins; + int *maxpin; }; # --- gpio_if.m.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"