power_mgmt: Make device_pm_ops definition static

DEFINE_DEVICE_PM macro was not defining device_pm_ops
as 'static'. Fixes the issue and impacted areas.

Jira: ZEP-639
Change-Id: I5e1de6af97bf7b2b690af0c81034ce167e655e43
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
This commit is contained in:
Ramesh Thomas 2016-08-04 00:04:49 -07:00 committed by Anas Nashif
commit fa175975e9
4 changed files with 8 additions and 18 deletions

View file

@ -257,7 +257,7 @@ struct device_pm_ops {
* @param _resume name of the resume function
*/
#define DEFINE_DEVICE_PM_OPS(_name, _suspend, _resume) \
struct device_pm_ops _name##_dev_pm_ops = { \
static struct device_pm_ops _name##_dev_pm_ops = { \
.suspend = _suspend, \
.resume = _resume, \
}
@ -274,23 +274,12 @@ struct device_pm_ops {
#define DEVICE_PM_OPS_GET(_name) \
(&_name##_dev_pm_ops)
/**
* @brief Macro to declare the device_pm_ops structure
*
* The declaration would be added if CONFIG_DEVICE_POWER_MANAGEMENT
* is defined. Otherwise this macro will not add anything.
*
* @param _name name of the device
*/
#define DEVICE_PM_OPS_DECLARE(_name) \
extern struct device_pm_ops _name##_dev_pm_ops
/**
* @}
*/
#else
#define DEFINE_DEVICE_PM_OPS(_name, _suspend, _resume)
#define DEVICE_PM_OPS_GET(_name) NULL
#define DEVICE_PM_OPS_DECLARE(_name)
#endif
/**