[PATCH v2 12/12] clocksource: samsung-time: Add Device Tree support

Mark Rutland mark.rutland at arm.com
Mon Feb 18 20:48:12 EST 2013


Hi,

[...]

> +static void samsung_timer_parse_dt(struct device_node *np,
> +					const struct of_device_id *match)
> +{
> +	int i;
> +	u32 val;
> +
> +	timer_base = of_iomap(np, 0);
> +	if (!timer_base)
> +		panic("failed to map timer registers");
> +
> +	for (i = 0; i < SAMSUNG_PWM_NUM; ++i)
> +		timer_variant.irqs[i] = irq_of_parse_and_map(np, i);
> +
> +	if (!timer_variant.irqs[timer_source.event_id])
> +		panic("no clock event irq provided");
> +
> +	switch ((unsigned int)match->data) {
> +	case TYPE_S3C24XX:
> +		timer_variant.bits = 16;
> +		timer_variant.prescale = 25;
> +		timer_variant.prescale = 50;

Redundant conflicting assignments here.

Thanks,
Mark.


More information about the devicetree-discuss mailing list