History

gpio: uapi: clarify the meaning of 'empty' char arrays

Clarify that a char array containing a string is considered 'empty' if the first character is the null terminator. The remaining characters are not relevant to this determination.

Kent Gibson committed 6 years ago

Commit 2f84a2d1 parent c303c511 file · +3 −3Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/gpio.h+3−3
@@ -26,7 +26,7 @@ · 25 unmodified lines
26 * struct gpiochip_info - Information about a certain GPIO chip26 * struct gpiochip_info - Information about a certain GPIO chip
27 * @name: the Linux kernel name of this GPIO chip27 * @name: the Linux kernel name of this GPIO chip
28 * @label: a functional name for this GPIO chip, such as a product28 * @label: a functional name for this GPIO chip, such as a product
29 * number, may be empty29 * number, may be empty (i.e. label[0] == '\0')
30 * @lines: number of GPIO lines on this chip30 * @lines: number of GPIO lines on this chip
31 */31 */
32struct gpiochip_info {32struct gpiochip_info {
@@ -203,7 +203,7 @@ struct gpio_v2_line_request { · 170 unmodified lines
203 * struct gpio_v2_line_info - Information about a certain GPIO line203 * struct gpio_v2_line_info - Information about a certain GPIO line
204 * @name: the name of this GPIO line, such as the output pin of the line on204 * @name: the name of this GPIO line, such as the output pin of the line on
205 * the chip, a rail or a pin header name on a board, as specified by the205 * the chip, a rail or a pin header name on a board, as specified by the
206 * GPIO chip, may be empty206 * GPIO chip, may be empty (i.e. name[0] == '\0')
207 * @consumer: a functional name for the consumer of this GPIO line as set207 * @consumer: a functional name for the consumer of this GPIO line as set
208 * by whatever is using it, will be empty if there is no current user but208 * by whatever is using it, will be empty if there is no current user but
209 * may also be empty if the consumer doesn't set this up209 * may also be empty if the consumer doesn't set this up
@@ -315,7 +315,7 @@ struct gpio_v2_line_event { · 105 unmodified lines
315 * @flags: various flags for this line315 * @flags: various flags for this line
316 * @name: the name of this GPIO line, such as the output pin of the line on the316 * @name: the name of this GPIO line, such as the output pin of the line on the
317 * chip, a rail or a pin header name on a board, as specified by the gpio317 * chip, a rail or a pin header name on a board, as specified by the gpio
318 * chip, may be empty318 * chip, may be empty (i.e. name[0] == '\0')
319 * @consumer: a functional name for the consumer of this GPIO line as set by319 * @consumer: a functional name for the consumer of this GPIO line as set by
320 * whatever is using it, will be empty if there is no current user but may320 * whatever is using it, will be empty if there is no current user but may
321 * also be empty if the consumer doesn't set this up321 * also be empty if the consumer doesn't set this up