Skip to content

Commit e7b9152

Browse files
jhovoldrafaeljw
authored andcommitted
PM: sleep: wakeirq: drop unused enable helpers
Drop the wake-irq enable and disable helpers which have not been used since commit bed5703 ("PM / wakeirq: Fix dedicated wakeirq for drivers not using autosuspend"). Note that these functions are essentially just leftovers from the first iteration of the wake-irq implementation where device drivers were supposed to call these functions themselves instead of PM core (as is also indicated by the bogus kernel doc comments). Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 8527beb commit e7b9152

File tree

2 files changed

+0
-59
lines changed

2 files changed

+0
-59
lines changed

drivers/base/power/wakeirq.c

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ static int __dev_pm_set_dedicated_wake_irq(struct device *dev, int irq, unsigned
194194
return err;
195195
}
196196

197-
198197
/**
199198
* dev_pm_set_dedicated_wake_irq - Request a dedicated wake-up interrupt
200199
* @dev: Device entry
@@ -206,11 +205,6 @@ static int __dev_pm_set_dedicated_wake_irq(struct device *dev, int irq, unsigned
206205
* Sets up a threaded interrupt handler for a device that has
207206
* a dedicated wake-up interrupt in addition to the device IO
208207
* interrupt.
209-
*
210-
* The interrupt starts disabled, and needs to be managed for
211-
* the device by the bus code or the device driver using
212-
* dev_pm_enable_wake_irq*() and dev_pm_disable_wake_irq*()
213-
* functions.
214208
*/
215209
int dev_pm_set_dedicated_wake_irq(struct device *dev, int irq)
216210
{
@@ -232,56 +226,13 @@ EXPORT_SYMBOL_GPL(dev_pm_set_dedicated_wake_irq);
232226
* the status of WAKE_IRQ_DEDICATED_REVERSE to tell rpm_suspend()
233227
* to enable dedicated wake-up interrupt after running the runtime suspend
234228
* callback for @dev.
235-
*
236-
* The interrupt starts disabled, and needs to be managed for
237-
* the device by the bus code or the device driver using
238-
* dev_pm_enable_wake_irq*() and dev_pm_disable_wake_irq*()
239-
* functions.
240229
*/
241230
int dev_pm_set_dedicated_wake_irq_reverse(struct device *dev, int irq)
242231
{
243232
return __dev_pm_set_dedicated_wake_irq(dev, irq, WAKE_IRQ_DEDICATED_REVERSE);
244233
}
245234
EXPORT_SYMBOL_GPL(dev_pm_set_dedicated_wake_irq_reverse);
246235

247-
/**
248-
* dev_pm_enable_wake_irq - Enable device wake-up interrupt
249-
* @dev: Device
250-
*
251-
* Optionally called from the bus code or the device driver for
252-
* runtime_resume() to override the PM runtime core managed wake-up
253-
* interrupt handling to enable the wake-up interrupt.
254-
*
255-
* Note that for runtime_suspend()) the wake-up interrupts
256-
* should be unconditionally enabled unlike for suspend()
257-
* that is conditional.
258-
*/
259-
void dev_pm_enable_wake_irq(struct device *dev)
260-
{
261-
struct wake_irq *wirq = dev->power.wakeirq;
262-
263-
if (wirq && (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED))
264-
enable_irq(wirq->irq);
265-
}
266-
EXPORT_SYMBOL_GPL(dev_pm_enable_wake_irq);
267-
268-
/**
269-
* dev_pm_disable_wake_irq - Disable device wake-up interrupt
270-
* @dev: Device
271-
*
272-
* Optionally called from the bus code or the device driver for
273-
* runtime_suspend() to override the PM runtime core managed wake-up
274-
* interrupt handling to disable the wake-up interrupt.
275-
*/
276-
void dev_pm_disable_wake_irq(struct device *dev)
277-
{
278-
struct wake_irq *wirq = dev->power.wakeirq;
279-
280-
if (wirq && (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED))
281-
disable_irq_nosync(wirq->irq);
282-
}
283-
EXPORT_SYMBOL_GPL(dev_pm_disable_wake_irq);
284-
285236
/**
286237
* dev_pm_enable_wake_irq_check - Checks and enables wake-up interrupt
287238
* @dev: Device

include/linux/pm_wakeirq.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ extern int dev_pm_set_wake_irq(struct device *dev, int irq);
1010
extern int dev_pm_set_dedicated_wake_irq(struct device *dev, int irq);
1111
extern int dev_pm_set_dedicated_wake_irq_reverse(struct device *dev, int irq);
1212
extern void dev_pm_clear_wake_irq(struct device *dev);
13-
extern void dev_pm_enable_wake_irq(struct device *dev);
14-
extern void dev_pm_disable_wake_irq(struct device *dev);
1513

1614
#else /* !CONFIG_PM */
1715

@@ -34,13 +32,5 @@ static inline void dev_pm_clear_wake_irq(struct device *dev)
3432
{
3533
}
3634

37-
static inline void dev_pm_enable_wake_irq(struct device *dev)
38-
{
39-
}
40-
41-
static inline void dev_pm_disable_wake_irq(struct device *dev)
42-
{
43-
}
44-
4535
#endif /* CONFIG_PM */
4636
#endif /* _LINUX_PM_WAKEIRQ_H */

0 commit comments

Comments
 (0)