On 23 December 2011 11:40, Evgeny Voevodin <e.voevo...@samsung.com> wrote: > + > +#define TCNTB(x) (0xC*x) > +#define TCMPB(x) (0xC*x+1) > +#define TCNTO(x) (0xC*x+2) > + > +#define GET_PRESCALER(reg, x) ((reg&(0xFF<<(8*x)))>>8*x) > +#define GET_DIVIDER(reg, x) (1<<((0xF<<(4*x))>>(4*x)))
These macros (and the ones below) brackets around arguments (ie "(x)") to avoid operator precedence issues. > +static SysBusDeviceInfo exynos4210_pwm_info = { > + .qdev.name = "exynos4210.pwm", > + .qdev.size = sizeof(struct Exynos4210PWMState), > + .qdev.reset = exynos4210_pwm_reset, > + .qdev.vmsd = &VMState_Exynos4210PWMState, > + .init = exynos4210_pwm_init, > + .qdev.props = (Property[]) { > + DEFINE_PROP_END_OF_LIST(), > + } If you don't have any properties, you don't need to set .qdev.props at all -- there's no need to explicitly write out an empty list like this. -- PMM