From: Jeff Garzik <jgarzik@pobox.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org
Subject: Re: [PATCH] move pm_register/etc. to CONFIG_PM_LEGACY, pm_legacy.h
Date: Mon, 07 Nov 2005 04:20:23 -0500 [thread overview]
Message-ID: <436F1C57.7080900@pobox.com> (raw)
In-Reply-To: <20051107091313.GA15128@havoc.gtf.org>
[-- Attachment #1: Type: text/plain, Size: 230 bytes --]
Jeff Garzik wrote:
> Since few people need the support anymore, this moves the legacy
> pm_xxx functions to CONFIG_PM_LEGACY, and include/linux/pm_legacy.h.
Whoops. You'll need include/linux/pm_legacy.h too (attached).
Jeff
[-- Attachment #2: pm_legacy.h --]
[-- Type: text/plain, Size: 1095 bytes --]
#ifndef __LINUX_PM_LEGACY_H__
#define __LINUX_PM_LEGACY_H__
#include <linux/config.h>
#ifdef CONFIG_PM_LEGACY
extern int pm_active;
#define PM_IS_ACTIVE() (pm_active != 0)
/*
* Register a device with power management
*/
struct pm_dev __deprecated *
pm_register(pm_dev_t type, unsigned long id, pm_callback callback);
/*
* Unregister a device with power management
*/
void __deprecated pm_unregister(struct pm_dev *dev);
/*
* Unregister all devices with matching callback
*/
void __deprecated pm_unregister_all(pm_callback callback);
/*
* Send a request to all devices
*/
int __deprecated pm_send_all(pm_request_t rqst, void *data);
#else /* CONFIG_PM_LEGACY */
#define PM_IS_ACTIVE() 0
static inline struct pm_dev *pm_register(pm_dev_t type,
unsigned long id,
pm_callback callback)
{
return NULL;
}
static inline void pm_unregister(struct pm_dev *dev) {}
static inline void pm_unregister_all(pm_callback callback) {}
static inline int pm_send_all(pm_request_t rqst, void *data)
{
return 0;
}
#endif /* CONFIG_PM_LEGACY */
#endif /* __LINUX_PM_LEGACY_H__ */
next prev parent reply other threads:[~2005-11-07 9:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-07 9:13 [PATCH] move pm_register/etc. to CONFIG_PM_LEGACY, pm_legacy.h Jeff Garzik
2005-11-07 9:20 ` Jeff Garzik [this message]
2005-11-10 15:09 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=436F1C57.7080900@pobox.com \
--to=jgarzik@pobox.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox