From 4346f65426cbceb64794b468e4af6f5632d58c5e Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Wed, 30 Apr 2008 23:04:37 +0200 Subject: hrtimer: remove duplicate helper function The helper function hrtimer_callback_running() is used in kernel/hrtimer.c as well as in the updated net/can/bcm.c which now supports hrtimers. Moving the helper function to hrtimer.h removes the duplicate definition in the C-files. Signed-off-by: Oliver Hartkopp Cc: David Miller Signed-off-by: Thomas Gleixner --- kernel/hrtimer.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'kernel') diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 9af1d6a8095..421be5fe5cc 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -153,15 +153,6 @@ static void hrtimer_get_softirq_time(struct hrtimer_cpu_base *base) ktime_add(xtim, tomono); } -/* - * Helper function to check, whether the timer is running the callback - * function - */ -static inline int hrtimer_callback_running(struct hrtimer *timer) -{ - return timer->state & HRTIMER_STATE_CALLBACK; -} - /* * Functions and macros which are different for UP/SMP systems are kept in a * single place -- cgit v1.2.3 From 4359a023a8c3b247b348c310bf510b23f3c1ab64 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Fri, 2 May 2008 12:49:40 +0200 Subject: clocksource: Fix permissions for available_clocksource File permissions for /sys/devices/system/clocksource/clocksource0/available_clocksource are 600 which allows write access. But this is in fact a read only file. So change permissions to 400. Signed-off-by: Heiko Carstens Cc: John Stultz Cc: Andrew Morton Signed-off-by: Thomas Gleixner --- kernel/time/clocksource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel') diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 73961f35fdc..83221ed76e6 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -474,7 +474,7 @@ sysfs_show_available_clocksources(struct sys_device *dev, char *buf) static SYSDEV_ATTR(current_clocksource, 0600, sysfs_show_current_clocksources, sysfs_override_clocksource); -static SYSDEV_ATTR(available_clocksource, 0600, +static SYSDEV_ATTR(available_clocksource, 0400, sysfs_show_available_clocksources, NULL); static struct sysdev_class clocksource_sysclass = { -- cgit v1.2.3 From 4f95f81a48623982879f4fa80c641933444afd18 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Sat, 3 May 2008 14:23:14 +0200 Subject: clocksource: allow read access to available/current_clocksource There is no harm, when users can read the info and we ask often enough during debugging for this kind of information. Signed-off-by: Heiko Carstens Cc: Andrew Morton Cc: John Stultz Signed-off-by: Thomas Gleixner --- kernel/time/clocksource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kernel') diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 83221ed76e6..dadde5361f3 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -471,10 +471,10 @@ sysfs_show_available_clocksources(struct sys_device *dev, char *buf) /* * Sysfs setup bits: */ -static SYSDEV_ATTR(current_clocksource, 0600, sysfs_show_current_clocksources, +static SYSDEV_ATTR(current_clocksource, 0644, sysfs_show_current_clocksources, sysfs_override_clocksource); -static SYSDEV_ATTR(available_clocksource, 0400, +static SYSDEV_ATTR(available_clocksource, 0444, sysfs_show_available_clocksources, NULL); static struct sysdev_class clocksource_sysclass = { -- cgit v1.2.3