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
2626 * struct gpiochip_info - Information about a certain GPIO chip
2727 * @name: the Linux kernel name of this GPIO chip
2828 * @label: a functional name for this GPIO chip, such as a product
29− * number, may be empty
29+ * number, may be empty (i.e. label[0] == '\0')
3030 * @lines: number of GPIO lines on this chip
3131 */
3232 struct gpiochip_info {
@@ -203,7 +203,7 @@ struct gpio_v2_line_request { · 170 unmodified lines
203203 * struct gpio_v2_line_info - Information about a certain GPIO line
204204 * @name: the name of this GPIO line, such as the output pin of the line on
205205 * the chip, a rail or a pin header name on a board, as specified by the
206− * GPIO chip, may be empty
206+ * GPIO chip, may be empty (i.e. name[0] == '\0')
207207 * @consumer: a functional name for the consumer of this GPIO line as set
208208 * by whatever is using it, will be empty if there is no current user but
209209 * may also be empty if the consumer doesn't set this up
@@ -315,7 +315,7 @@ struct gpio_v2_line_event { · 105 unmodified lines
315315 * @flags: various flags for this line
316316 * @name: the name of this GPIO line, such as the output pin of the line on the
317317 * chip, a rail or a pin header name on a board, as specified by the gpio
318− * chip, may be empty
318+ * chip, may be empty (i.e. name[0] == '\0')
319319 * @consumer: a functional name for the consumer of this GPIO line as set by
320320 * whatever is using it, will be empty if there is no current user but may
321321 * also be empty if the consumer doesn't set this up