Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 844056fd authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer updates from Thomas Gleixner:

 - The final conversion of timer wheel timers to timer_setup().

   A few manual conversions and a large coccinelle assisted sweep and
   the removal of the old initialization mechanisms and the related
   code.

 - Remove the now unused VSYSCALL update code

 - Fix permissions of /proc/timer_list. I still need to get rid of that
   file completely

 - Rename a misnomed clocksource function and remove a stale declaration

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
  m68k/macboing: Fix missed timer callback assignment
  treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts
  timer: Remove redundant __setup_timer*() macros
  timer: Pass function down to initialization routines
  timer: Remove unused data arguments from macros
  timer: Switch callback prototype to take struct timer_list * argument
  timer: Pass timer_list pointer to callbacks unconditionally
  Coccinelle: Remove setup_timer.cocci
  timer: Remove setup_*timer() interface
  timer: Remove init_timer() interface
  treewide: setup_timer() -> timer_setup() (2 field)
  treewide: setup_timer() -> timer_setup()
  treewide: init_timer() -> setup_timer()
  treewide: Switch DEFINE_TIMER callbacks to struct timer_list *
  s390: cmm: Convert timers to use timer_setup()
  lightnvm: Convert timers to use timer_setup()
  drivers/net: cris: Convert timers to use timer_setup()
  drm/vc4: Convert timers to use timer_setup()
  block/laptop_mode: Convert timers to use timer_setup()
  net/atm/mpc: Avoid open-coded assignment of timer callback function
  ...
parents ca122fe3 54b8a230
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -177,18 +177,14 @@ Here is a sample module which implements a basic per cpu counter using
                    printk("Read : CPU %d, count %ld\n", cpu,
                            local_read(&per_cpu(counters, cpu)));
            }
            del_timer(&test_timer);
            test_timer.expires = jiffies + 1000;
            add_timer(&test_timer);
            mod_timer(&test_timer, jiffies + 1000);
    }

    static int __init test_init(void)
    {
            /* initialize the timer that will increment the counter */
            init_timer(&test_timer);
            test_timer.function = do_test_timer;
            test_timer.expires = jiffies + 1;
            add_timer(&test_timer);
            timer_setup(&test_timer, do_test_timer, 0);
            mod_timer(&test_timer, jiffies + 1);

            return 0;
    }
+3 −4
Original line number Diff line number Diff line
@@ -65,9 +65,9 @@ srmcons_do_receive_chars(struct tty_port *port)
}

static void
srmcons_receive_chars(unsigned long data)
srmcons_receive_chars(struct timer_list *t)
{
	struct srmcons_private *srmconsp = (struct srmcons_private *)data;
	struct srmcons_private *srmconsp = from_timer(srmconsp, t, timer);
	struct tty_port *port = &srmconsp->port;
	unsigned long flags;
	int incr = 10;
@@ -206,8 +206,7 @@ static const struct tty_operations srmcons_ops = {
static int __init
srmcons_init(void)
{
	setup_timer(&srmcons_singleton.timer, srmcons_receive_chars,
			(unsigned long)&srmcons_singleton);
	timer_setup(&srmcons_singleton.timer, srmcons_receive_chars, 0);
	if (srm_is_registered_console) {
		struct tty_driver *driver;
		int err;
+2 −3
Original line number Diff line number Diff line
@@ -305,7 +305,7 @@ static void n2100_restart(enum reboot_mode mode, const char *cmd)

static struct timer_list power_button_poll_timer;

static void power_button_poll(unsigned long dummy)
static void power_button_poll(struct timer_list *unused)
{
	if (gpio_get_value(N2100_POWER_BUTTON) == 0) {
		ctrl_alt_del();
@@ -336,8 +336,7 @@ static int __init n2100_request_gpios(void)
			pr_err("could not set power GPIO as input\n");
	}
	/* Set up power button poll timer */
	init_timer(&power_button_poll_timer);
	power_button_poll_timer.function = power_button_poll;
	timer_setup(&power_button_poll_timer, power_button_poll, 0);
	power_button_poll_timer.expires = jiffies + (HZ / 10);
	add_timer(&power_button_poll_timer);
	return 0;
+2 −2
Original line number Diff line number Diff line
@@ -179,10 +179,10 @@ static int power_button_countdown;
/* Must hold the button down for at least this many counts to be processed */
#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */

static void dsmg600_power_handler(unsigned long data);
static void dsmg600_power_handler(struct timer_list *unused);
static DEFINE_TIMER(dsmg600_power_timer, dsmg600_power_handler);

static void dsmg600_power_handler(unsigned long data)
static void dsmg600_power_handler(struct timer_list *unused)
{
	/* This routine is called twice per second to check the
	 * state of the power button.
+2 −2
Original line number Diff line number Diff line
@@ -202,10 +202,10 @@ static int power_button_countdown;
/* Must hold the button down for at least this many counts to be processed */
#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */

static void nas100d_power_handler(unsigned long data);
static void nas100d_power_handler(struct timer_list *unused);
static DEFINE_TIMER(nas100d_power_timer, nas100d_power_handler);

static void nas100d_power_handler(unsigned long data)
static void nas100d_power_handler(struct timer_list *unused)
{
	/* This routine is called twice per second to check the
	 * state of the power button.
Loading