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

Commit da2963e8 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

Merge tag 'timers-conversion-next2' of...

Merge tag 'timers-conversion-next2' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into timers/core

Pull the next batch of timer conversions from Kees Cook:

 - Second batch of scsi conversions that have been Reviewed and/or Acked.
 - Various *_on_stack() changes for USB, Acked by Greg.
 - DRM conversion that was declared too late for drm's tree, but Acked for timers.
 - RAS driver conversion, Acked.
parents 00ed87da 856ec53f
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -23,9 +23,9 @@
#include "psb_intel_reg.h"
#include <linux/spinlock.h>

static void psb_lid_timer_func(unsigned long data)
static void psb_lid_timer_func(struct timer_list *t)
{
	struct drm_psb_private * dev_priv = (struct drm_psb_private *)data;
	struct drm_psb_private *dev_priv = from_timer(dev_priv, t, lid_timer);
	struct drm_device *dev = (struct drm_device *)dev_priv->dev;
	struct timer_list *lid_timer = &dev_priv->lid_timer;
	unsigned long irq_flags;
@@ -77,10 +77,8 @@ void psb_lid_timer_init(struct drm_psb_private *dev_priv)
	spin_lock_init(&dev_priv->lid_lock);
	spin_lock_irqsave(&dev_priv->lid_lock, irq_flags);

	init_timer(lid_timer);
	timer_setup(lid_timer, psb_lid_timer_func, 0);

	lid_timer->data = (unsigned long)dev_priv;
	lid_timer->function = psb_lid_timer_func;
	lid_timer->expires = jiffies + PSB_LID_DELAY;

	add_timer(lid_timer);
+3 −5
Original line number Diff line number Diff line
@@ -168,11 +168,9 @@ static void cec_mod_timer(struct timer_list *t, unsigned long interval)
	mod_timer(t, round_jiffies(iv));
}

static void cec_timer_fn(unsigned long data)
static void cec_timer_fn(struct timer_list *unused)
{
	struct ce_array *ca = (struct ce_array *)data;

	do_spring_cleaning(ca);
	do_spring_cleaning(&ce_arr);

	cec_mod_timer(&cec_timer, timer_interval);
}
@@ -509,7 +507,7 @@ void __init cec_init(void)
	if (create_debugfs_nodes())
		return;

	setup_timer(&cec_timer, cec_timer_fn, (unsigned long)&ce_arr);
	timer_setup(&cec_timer, cec_timer_fn, 0);
	cec_mod_timer(&cec_timer, CEC_TIMER_DEFAULT_INTERVAL);

	pr_info("Correctable Errors collector initialized.\n");
+1 −4
Original line number Diff line number Diff line
@@ -1046,8 +1046,6 @@ typedef enum {

typedef uint8_t ahd_mode_state;

typedef void ahd_callback_t (void *);

struct ahd_completion
{
	uint16_t	tag;
@@ -1122,8 +1120,7 @@ struct ahd_softc {
	/*
	 * Timer handles for timer driven callbacks.
	 */
	ahd_timer_t		  reset_timer;
	ahd_timer_t		  stat_timer;
	struct timer_list	stat_timer;

	/*
	 * Statistics.
+8 −21
Original line number Diff line number Diff line
@@ -207,7 +207,7 @@ static void ahd_add_scb_to_free_list(struct ahd_softc *ahd,
static u_int		ahd_rem_wscb(struct ahd_softc *ahd, u_int scbid,
				     u_int prev, u_int next, u_int tid);
static void		ahd_reset_current_bus(struct ahd_softc *ahd);
static ahd_callback_t	ahd_stat_timer;
static void		ahd_stat_timer(struct timer_list *t);
#ifdef AHD_DUMP_SEQ
static void		ahd_dumpseq(struct ahd_softc *ahd);
#endif
@@ -6104,8 +6104,7 @@ ahd_alloc(void *platform_arg, char *name)
	ahd->bugs = AHD_BUGNONE;
	ahd->flags = AHD_SPCHK_ENB_A|AHD_RESET_BUS_A|AHD_TERM_ENB_A
		   | AHD_EXTENDED_TRANS_A|AHD_STPWLEVEL_A;
	ahd_timer_init(&ahd->reset_timer);
	ahd_timer_init(&ahd->stat_timer);
	timer_setup(&ahd->stat_timer, ahd_stat_timer, 0);
	ahd->int_coalescing_timer = AHD_INT_COALESCING_TIMER_DEFAULT;
	ahd->int_coalescing_maxcmds = AHD_INT_COALESCING_MAXCMDS_DEFAULT;
	ahd->int_coalescing_mincmds = AHD_INT_COALESCING_MINCMDS_DEFAULT;
@@ -6235,8 +6234,7 @@ ahd_shutdown(void *arg)
	/*
	 * Stop periodic timer callbacks.
	 */
	ahd_timer_stop(&ahd->reset_timer);
	ahd_timer_stop(&ahd->stat_timer);
	del_timer_sync(&ahd->stat_timer);

	/* This will reset most registers to 0, but not all */
	ahd_reset(ahd, /*reinit*/FALSE);
@@ -7039,20 +7037,11 @@ static const char *termstat_strings[] = {
};

/***************************** Timer Facilities *******************************/
#define ahd_timer_init init_timer
#define ahd_timer_stop del_timer_sync
typedef void ahd_linux_callback_t (u_long);

static void
ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_callback_t *func, void *arg)
ahd_timer_reset(struct timer_list *timer, int usec)
{
	struct ahd_softc *ahd;

	ahd = (struct ahd_softc *)arg;
	del_timer(timer);
	timer->data = (u_long)arg;
	timer->expires = jiffies + (usec * HZ)/1000000;
	timer->function = (ahd_linux_callback_t*)func;
	add_timer(timer);
}

@@ -7279,8 +7268,7 @@ ahd_init(struct ahd_softc *ahd)
	}
init_done:
	ahd_restart(ahd);
	ahd_timer_reset(&ahd->stat_timer, AHD_STAT_UPDATE_US,
			ahd_stat_timer, ahd);
	ahd_timer_reset(&ahd->stat_timer, AHD_STAT_UPDATE_US);
	return (0);
}

@@ -8878,9 +8866,9 @@ ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset)

/**************************** Statistics Processing ***************************/
static void
ahd_stat_timer(void *arg)
ahd_stat_timer(struct timer_list *t)
{
	struct	ahd_softc *ahd = arg;
	struct	ahd_softc *ahd = from_timer(ahd, t, stat_timer);
	u_long	s;
	int	enint_coal;
	
@@ -8907,8 +8895,7 @@ ahd_stat_timer(void *arg)
	ahd->cmdcmplt_bucket = (ahd->cmdcmplt_bucket+1) & (AHD_STAT_BUCKETS-1);
	ahd->cmdcmplt_total -= ahd->cmdcmplt_counts[ahd->cmdcmplt_bucket];
	ahd->cmdcmplt_counts[ahd->cmdcmplt_bucket] = 0;
	ahd_timer_reset(&ahd->stat_timer, AHD_STAT_UPDATE_US,
			ahd_stat_timer, ahd);
	ahd_timer_reset(&ahd->stat_timer, AHD_STAT_UPDATE_US);
	ahd_unlock(ahd, &s);
}

+0 −7
Original line number Diff line number Diff line
@@ -203,9 +203,6 @@ int ahd_dmamap_unload(struct ahd_softc *, bus_dma_tag_t, bus_dmamap_t);
 */
#define ahd_dmamap_sync(ahd, dma_tag, dmamap, offset, len, op)

/************************** Timer DataStructures ******************************/
typedef struct timer_list ahd_timer_t;

/********************************** Includes **********************************/
#ifdef CONFIG_AIC79XX_REG_PRETTY_PRINT
#define AIC_DEBUG_REGISTERS 1
@@ -214,10 +211,6 @@ typedef struct timer_list ahd_timer_t;
#endif
#include "aic79xx.h"

/***************************** Timer Facilities *******************************/
#define ahd_timer_init init_timer
#define ahd_timer_stop del_timer_sync

/***************************** SMP support ************************************/
#include <linux/spinlock.h>

Loading