Skip to content

Commit

Permalink
USB: core: export usb_cache_string()
Browse files Browse the repository at this point in the history
usb_cache_string() can also be useful for the drivers so export it.

Signed-off-by: Vincent Mailhol <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Link: https://lore.kernel.org/all/[email protected]
Signed-off-by: Marc Kleine-Budde <[email protected]>
  • Loading branch information
vincent-mailhol authored and marckleinebudde committed Dec 12, 2022
1 parent 594a25e commit 983055b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/usb/core/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,7 @@ char *usb_cache_string(struct usb_device *udev, int index)
}
return smallbuf;
}
EXPORT_SYMBOL_GPL(usb_cache_string);

/*
* usb_get_device_descriptor - (re)reads the device descriptor (usbcore)
Expand Down
1 change: 0 additions & 1 deletion drivers/usb/core/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ extern int usb_get_device_descriptor(struct usb_device *dev,
extern int usb_set_isoch_delay(struct usb_device *dev);
extern int usb_get_bos_descriptor(struct usb_device *dev);
extern void usb_release_bos_descriptor(struct usb_device *dev);
extern char *usb_cache_string(struct usb_device *udev, int index);
extern int usb_set_configuration(struct usb_device *dev, int configuration);
extern int usb_choose_configuration(struct usb_device *udev);
extern int usb_generic_driver_probe(struct usb_device *udev);
Expand Down
1 change: 1 addition & 0 deletions include/linux/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -1829,6 +1829,7 @@ static inline int usb_get_ptm_status(struct usb_device *dev, void *data)

extern int usb_string(struct usb_device *dev, int index,
char *buf, size_t size);
extern char *usb_cache_string(struct usb_device *udev, int index);

/* wrappers that also update important state inside usbcore */
extern int usb_clear_halt(struct usb_device *dev, int pipe);
Expand Down

0 comments on commit 983055b

Please sign in to comment.