mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
33def8498f
Use a more generic form for __section that requires quotes to avoid complications with clang and gcc differences. Remove the quote operator # from compiler_attributes.h __section macro. Convert all unquoted __section(foo) uses to quoted __section("foo"). Also convert __attribute__((section("foo"))) uses to __section("foo") even if the __attribute__ has multiple list entry forms. Conversion done using the script at: https://lore.kernel.org/lkml/75393e5ddc272dc7403de74d645e6c6e0f4e70eb.camel@perches.com/2-convert_section.pl Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Nick Desaulniers <ndesaulniers@gooogle.com> Reviewed-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
46 lines
959 B
C
46 lines
959 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
|
|
*/
|
|
|
|
#include <linux/acpi.h>
|
|
#include <linux/init.h>
|
|
#include <linux/of.h>
|
|
#include <linux/clocksource.h>
|
|
|
|
extern struct of_device_id __timer_of_table[];
|
|
|
|
static const struct of_device_id __timer_of_table_sentinel
|
|
__used __section("__timer_of_table_end");
|
|
|
|
void __init timer_probe(void)
|
|
{
|
|
struct device_node *np;
|
|
const struct of_device_id *match;
|
|
of_init_fn_1_ret init_func_ret;
|
|
unsigned timers = 0;
|
|
int ret;
|
|
|
|
for_each_matching_node_and_match(np, __timer_of_table, &match) {
|
|
if (!of_device_is_available(np))
|
|
continue;
|
|
|
|
init_func_ret = match->data;
|
|
|
|
ret = init_func_ret(np);
|
|
if (ret) {
|
|
if (ret != -EPROBE_DEFER)
|
|
pr_err("Failed to initialize '%pOF': %d\n", np,
|
|
ret);
|
|
continue;
|
|
}
|
|
|
|
timers++;
|
|
}
|
|
|
|
timers += acpi_probe_device_table(timer);
|
|
|
|
if (!timers)
|
|
pr_crit("%s: no matching timers found\n", __func__);
|
|
}
|