Merge branch 'timer-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timer-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: hrtimer: Initialize CLOCK_ID to HRTIMER_BASE table statically rtc: max8925: Call dev_set_drvdata before rtc_device_register
This commit is contained in:
@@ -257,6 +257,8 @@ static int __devinit max8925_rtc_probe(struct platform_device *pdev)
|
|||||||
goto out_irq;
|
goto out_irq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dev_set_drvdata(&pdev->dev, info);
|
||||||
|
|
||||||
info->rtc_dev = rtc_device_register("max8925-rtc", &pdev->dev,
|
info->rtc_dev = rtc_device_register("max8925-rtc", &pdev->dev,
|
||||||
&max8925_rtc_ops, THIS_MODULE);
|
&max8925_rtc_ops, THIS_MODULE);
|
||||||
ret = PTR_ERR(info->rtc_dev);
|
ret = PTR_ERR(info->rtc_dev);
|
||||||
@@ -265,7 +267,6 @@ static int __devinit max8925_rtc_probe(struct platform_device *pdev)
|
|||||||
goto out_rtc;
|
goto out_rtc;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_set_drvdata(&pdev->dev, info);
|
|
||||||
platform_set_drvdata(pdev, info);
|
platform_set_drvdata(pdev, info);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -81,7 +81,11 @@ DEFINE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases) =
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static int hrtimer_clock_to_base_table[MAX_CLOCKS];
|
static int hrtimer_clock_to_base_table[MAX_CLOCKS] = {
|
||||||
|
[CLOCK_REALTIME] = HRTIMER_BASE_REALTIME,
|
||||||
|
[CLOCK_MONOTONIC] = HRTIMER_BASE_MONOTONIC,
|
||||||
|
[CLOCK_BOOTTIME] = HRTIMER_BASE_BOOTTIME,
|
||||||
|
};
|
||||||
|
|
||||||
static inline int hrtimer_clockid_to_base(clockid_t clock_id)
|
static inline int hrtimer_clockid_to_base(clockid_t clock_id)
|
||||||
{
|
{
|
||||||
@@ -1722,10 +1726,6 @@ static struct notifier_block __cpuinitdata hrtimers_nb = {
|
|||||||
|
|
||||||
void __init hrtimers_init(void)
|
void __init hrtimers_init(void)
|
||||||
{
|
{
|
||||||
hrtimer_clock_to_base_table[CLOCK_REALTIME] = HRTIMER_BASE_REALTIME;
|
|
||||||
hrtimer_clock_to_base_table[CLOCK_MONOTONIC] = HRTIMER_BASE_MONOTONIC;
|
|
||||||
hrtimer_clock_to_base_table[CLOCK_BOOTTIME] = HRTIMER_BASE_BOOTTIME;
|
|
||||||
|
|
||||||
hrtimer_cpu_notify(&hrtimers_nb, (unsigned long)CPU_UP_PREPARE,
|
hrtimer_cpu_notify(&hrtimers_nb, (unsigned long)CPU_UP_PREPARE,
|
||||||
(void *)(long)smp_processor_id());
|
(void *)(long)smp_processor_id());
|
||||||
register_cpu_notifier(&hrtimers_nb);
|
register_cpu_notifier(&hrtimers_nb);
|
||||||
|
Reference in New Issue
Block a user