clockevents: Rename state to state_use_accessors
The only sensible way to make abuse of core internal fields obvious and easy to grep for. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Peter Zijlstra <peterz@infradead.org>
This commit is contained in:
parent
051ebd101b
commit
be3ef76e9d
|
@ -87,7 +87,7 @@ enum clock_event_state {
|
||||||
* @mult: nanosecond to cycles multiplier
|
* @mult: nanosecond to cycles multiplier
|
||||||
* @shift: nanoseconds to cycles divisor (power of two)
|
* @shift: nanoseconds to cycles divisor (power of two)
|
||||||
* @mode: operating mode, relevant only to ->set_mode(), OBSOLETE
|
* @mode: operating mode, relevant only to ->set_mode(), OBSOLETE
|
||||||
* @state: current state of the device, assigned by the core code
|
* @state_use_accessors:current state of the device, assigned by the core code
|
||||||
* @features: features
|
* @features: features
|
||||||
* @retries: number of forced programming retries
|
* @retries: number of forced programming retries
|
||||||
* @set_mode: legacy set mode function, only for modes <= CLOCK_EVT_MODE_RESUME.
|
* @set_mode: legacy set mode function, only for modes <= CLOCK_EVT_MODE_RESUME.
|
||||||
|
@ -117,7 +117,7 @@ struct clock_event_device {
|
||||||
u32 mult;
|
u32 mult;
|
||||||
u32 shift;
|
u32 shift;
|
||||||
enum clock_event_mode mode;
|
enum clock_event_mode mode;
|
||||||
enum clock_event_state state;
|
enum clock_event_state state_use_accessors;
|
||||||
unsigned int features;
|
unsigned int features;
|
||||||
unsigned long retries;
|
unsigned long retries;
|
||||||
|
|
||||||
|
@ -152,27 +152,27 @@ struct clock_event_device {
|
||||||
/* Helpers to verify state of a clockevent device */
|
/* Helpers to verify state of a clockevent device */
|
||||||
static inline bool clockevent_state_detached(struct clock_event_device *dev)
|
static inline bool clockevent_state_detached(struct clock_event_device *dev)
|
||||||
{
|
{
|
||||||
return dev->state == CLOCK_EVT_STATE_DETACHED;
|
return dev->state_use_accessors == CLOCK_EVT_STATE_DETACHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool clockevent_state_shutdown(struct clock_event_device *dev)
|
static inline bool clockevent_state_shutdown(struct clock_event_device *dev)
|
||||||
{
|
{
|
||||||
return dev->state == CLOCK_EVT_STATE_SHUTDOWN;
|
return dev->state_use_accessors == CLOCK_EVT_STATE_SHUTDOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool clockevent_state_periodic(struct clock_event_device *dev)
|
static inline bool clockevent_state_periodic(struct clock_event_device *dev)
|
||||||
{
|
{
|
||||||
return dev->state == CLOCK_EVT_STATE_PERIODIC;
|
return dev->state_use_accessors == CLOCK_EVT_STATE_PERIODIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool clockevent_state_oneshot(struct clock_event_device *dev)
|
static inline bool clockevent_state_oneshot(struct clock_event_device *dev)
|
||||||
{
|
{
|
||||||
return dev->state == CLOCK_EVT_STATE_ONESHOT;
|
return dev->state_use_accessors == CLOCK_EVT_STATE_ONESHOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool clockevent_state_oneshot_stopped(struct clock_event_device *dev)
|
static inline bool clockevent_state_oneshot_stopped(struct clock_event_device *dev)
|
||||||
{
|
{
|
||||||
return dev->state == CLOCK_EVT_STATE_ONESHOT_STOPPED;
|
return dev->state_use_accessors == CLOCK_EVT_STATE_ONESHOT_STOPPED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -38,13 +38,13 @@ static inline int tick_device_is_functional(struct clock_event_device *dev)
|
||||||
|
|
||||||
static inline enum clock_event_state clockevent_get_state(struct clock_event_device *dev)
|
static inline enum clock_event_state clockevent_get_state(struct clock_event_device *dev)
|
||||||
{
|
{
|
||||||
return dev->state;
|
return dev->state_use_accessors;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void clockevent_set_state(struct clock_event_device *dev,
|
static inline void clockevent_set_state(struct clock_event_device *dev,
|
||||||
enum clock_event_state state)
|
enum clock_event_state state)
|
||||||
{
|
{
|
||||||
dev->state = state;
|
dev->state_use_accessors = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void clockevents_shutdown(struct clock_event_device *dev);
|
extern void clockevents_shutdown(struct clock_event_device *dev);
|
||||||
|
|
Loading…
Reference in New Issue