Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5edbfb7c authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman
Browse files

[PATCH] stop exporting two functions



The way we're looking at USB suspend lately doesn't expect drivers to
call usb_suspend_device() or usb_resume_device() directly; that'll
be implicit when no interfaces are in use.

This patch removes those APIs from visibility outside usbcore.

Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>

 drivers/usb/core/hub.c |   12 ++++--------
 drivers/usb/core/usb.h |    4 ++++
 include/linux/usb.h    |    5 -----
 3 files changed, 8 insertions(+), 13 deletions(-)
parent ccdcf77a
Loading
Loading
Loading
Loading
+4 −8
Original line number Original line Diff line number Diff line
@@ -1652,10 +1652,10 @@ static int __usb_suspend_device (struct usb_device *udev, int port1)


#endif
#endif


/**
/*
 * usb_suspend_device - suspend a usb device
 * usb_suspend_device - suspend a usb device
 * @udev: device that's no longer in active use
 * @udev: device that's no longer in active use
 * Context: must be able to sleep; device not locked
 * Context: must be able to sleep; device not locked; pm locks held
 *
 *
 * Suspends a USB device that isn't in active use, conserving power.
 * Suspends a USB device that isn't in active use, conserving power.
 * Devices may wake out of a suspend, if anything important happens,
 * Devices may wake out of a suspend, if anything important happens,
@@ -1820,10 +1820,10 @@ hub_port_resume(struct usb_hub *hub, int port1, struct usb_device *udev)


#endif
#endif


/**
/*
 * usb_resume_device - re-activate a suspended usb device
 * usb_resume_device - re-activate a suspended usb device
 * @udev: device to re-activate
 * @udev: device to re-activate
 * Context: must be able to sleep; device not locked
 * Context: must be able to sleep; device not locked; pm locks held
 *
 *
 * This will re-activate the suspended device, increasing power usage
 * This will re-activate the suspended device, increasing power usage
 * while letting drivers communicate again with its endpoints.
 * while letting drivers communicate again with its endpoints.
@@ -2024,10 +2024,6 @@ void usb_resume_root_hub(struct usb_device *hdev)
	kick_khubd(hub);
	kick_khubd(hub);
}
}


EXPORT_SYMBOL(usb_suspend_device);
EXPORT_SYMBOL(usb_resume_device);




/* USB 2.0 spec, 7.1.7.3 / fig 7-29:
/* USB 2.0 spec, 7.1.7.3 / fig 7-29:
 *
 *
+4 −0
Original line number Original line Diff line number Diff line
@@ -29,6 +29,10 @@ extern void usb_major_cleanup(void);
extern int usb_host_init(void);
extern int usb_host_init(void);
extern void usb_host_cleanup(void);
extern void usb_host_cleanup(void);


extern int usb_suspend_device(struct usb_device *dev);
extern int usb_resume_device(struct usb_device *dev);


/* Interfaces and their "power state" are owned by usbcore */
/* Interfaces and their "power state" are owned by usbcore */


static inline void mark_active(struct usb_interface *f)
static inline void mark_active(struct usb_interface *f)
+0 −5
Original line number Original line Diff line number Diff line
@@ -975,11 +975,6 @@ extern int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe,
	void *data, int len, int *actual_length,
	void *data, int len, int *actual_length,
	int timeout);
	int timeout);


/* selective suspend/resume */
extern int usb_suspend_device(struct usb_device *dev);
extern int usb_resume_device(struct usb_device *dev);


/* wrappers around usb_control_msg() for the most common standard requests */
/* wrappers around usb_control_msg() for the most common standard requests */
extern int usb_get_descriptor(struct usb_device *dev, unsigned char desctype,
extern int usb_get_descriptor(struct usb_device *dev, unsigned char desctype,
	unsigned char descindex, void *buf, int size);
	unsigned char descindex, void *buf, int size);