Skip to content

Commit afa26be

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt
* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt: clocksource: allow read access to available/current_clocksource clocksource: Fix permissions for available_clocksource hrtimer: remove duplicate helper function
2 parents 269f213 + 4f95f81 commit afa26be

4 files changed

Lines changed: 11 additions & 17 deletions

File tree

‎include/linux/hrtimer.h‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,15 @@ static inline int hrtimer_is_queued(struct hrtimer *timer)
316316
(HRTIMER_STATE_ENQUEUED | HRTIMER_STATE_PENDING);
317317
}
318318

319+
/*
320+
* Helper function to check, whether the timer is running the callback
321+
* function
322+
*/
323+
static inline int hrtimer_callback_running(struct hrtimer *timer)
324+
{
325+
return timer->state & HRTIMER_STATE_CALLBACK;
326+
}
327+
319328
/* Forward a hrtimer so it expires after now: */
320329
extern u64
321330
hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval);

‎kernel/hrtimer.c‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,6 @@ static void hrtimer_get_softirq_time(struct hrtimer_cpu_base *base)
153153
ktime_add(xtim, tomono);
154154
}
155155

156-
/*
157-
* Helper function to check, whether the timer is running the callback
158-
* function
159-
*/
160-
static inline int hrtimer_callback_running(struct hrtimer *timer)
161-
{
162-
return timer->state & HRTIMER_STATE_CALLBACK;
163-
}
164-
165156
/*
166157
* Functions and macros which are different for UP/SMP systems are kept in a
167158
* single place

‎kernel/time/clocksource.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,10 +471,10 @@ sysfs_show_available_clocksources(struct sys_device *dev, char *buf)
471471
/*
472472
* Sysfs setup bits:
473473
*/
474-
static SYSDEV_ATTR(current_clocksource, 0600, sysfs_show_current_clocksources,
474+
static SYSDEV_ATTR(current_clocksource, 0644, sysfs_show_current_clocksources,
475475
sysfs_override_clocksource);
476476

477-
static SYSDEV_ATTR(available_clocksource, 0600,
477+
static SYSDEV_ATTR(available_clocksource, 0444,
478478
sysfs_show_available_clocksources, NULL);
479479

480480
static struct sysdev_class clocksource_sysclass = {

‎net/can/bcm.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -412,12 +412,6 @@ static void bcm_rx_changed(struct bcm_op *op, struct can_frame *data)
412412
bcm_send_to_user(op, &head, data, 1);
413413
}
414414

415-
/* TODO: move to linux/hrtimer.h */
416-
static inline int hrtimer_callback_running(struct hrtimer *timer)
417-
{
418-
return timer->state & HRTIMER_STATE_CALLBACK;
419-
}
420-
421415
/*
422416
* bcm_rx_update_and_send - process a detected relevant receive content change
423417
* 1. update the last received data

0 commit comments

Comments
 (0)