summaryrefslogtreecommitdiff
path: root/timer.c
blob: c25d5b201ea7a032c8344aff535d503df750e724 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <unistd.h>
#include <sys/time.h>

#include "timer.h"

void set_itimer_interval_value(struct itimerval *itimer, unsigned long sec,
			       unsigned long usec)
{
	itimer->it_interval.tv_sec = sec;
	itimer->it_interval.tv_usec = usec;

	itimer->it_value.tv_sec = sec;
	itimer->it_value.tv_usec = usec;
}

int get_user_hz(void)
{
	return sysconf(_SC_CLK_TCK);
}
icheri2@ti.com>2016-04-11 10:50:31 -0400 committerBjorn Helgaas <bhelgaas@google.com>2016-04-25 14:23:54 -0500 commit1e9f8dcf892ddb183405cb2414bfc37b40300693 (patch) treea7438ee70398150cc85ee6804c932ced3110e79c /Documentation parent025dd3daeda77f61a280da87ae7015a6808dfe1f (diff)
PCI: keystone: Remove unnecessary goto statement
Fix the misuse of goto statement in ks_pcie_get_irq_controller_info() as simple return is more appropriate for this function. While at it add an error log for absence of interrupt controller node. [bhelgaas: drop "ret" altogether since we always know the return value] Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: Rob Herring <robh+dt@kernel.org> CC: Pawel Moll <pawel.moll@arm.com> CC: Mark Rutland <mark.rutland@arm.com> CC: Ian Campbell <ijc+devicetree@hellion.org.uk> CC: Kumar Gala <galak@codeaurora.org>
Diffstat (limited to 'Documentation')