Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139628
b: refs/heads/master
c: bf6aede
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare authored and Linus Torvalds committed Apr 3, 2009
1 parent fb7f2e7 commit 9966f39
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4c2ff1cf2d7fc65d0fc6f88bc98338e0212ad52
refs/heads/master: bf6aede712334d7338d5c47a5ee5ba3883c82a61
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kernel/vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ static void vio_cmo_balance(struct work_struct *work)
cmo->excess.size = cmo->entitled - cmo->reserve.size;
cmo->excess.free = cmo->excess.size - need;

cancel_delayed_work(container_of(work, struct delayed_work, work));
cancel_delayed_work(to_delayed_work(work));
spin_unlock_irqrestore(&vio_cmo.lock, flags);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/crypto/hifn_795x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1882,7 +1882,7 @@ static void hifn_clear_rings(struct hifn_device *dev, int error)

static void hifn_work(struct work_struct *work)
{
struct delayed_work *dw = container_of(work, struct delayed_work, work);
struct delayed_work *dw = to_delayed_work(work);
struct hifn_device *dev = container_of(dw, struct hifn_device, work);
unsigned long flags;
int reset = 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/input/mouse/hgpk.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ static void hgpk_disconnect(struct psmouse *psmouse)

static void hgpk_recalib_work(struct work_struct *work)
{
struct delayed_work *w = container_of(work, struct delayed_work, work);
struct delayed_work *w = to_delayed_work(work);
struct hgpk_data *priv = container_of(w, struct hgpk_data, recalib_wq);
struct psmouse *psmouse = priv->psmouse;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/dm9000.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ static void dm9000_show_carrier(board_info_t *db,
static void
dm9000_poll_work(struct work_struct *w)
{
struct delayed_work *dw = container_of(w, struct delayed_work, work);
struct delayed_work *dw = to_delayed_work(w);
board_info_t *db = container_of(dw, board_info_t, phy_poll);
struct net_device *ndev = db->ndev;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/mlx4/en_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ static void mlx4_en_auto_moderation(struct mlx4_en_priv *priv)

static void mlx4_en_do_get_stats(struct work_struct *work)
{
struct delayed_work *delay = container_of(work, struct delayed_work, work);
struct delayed_work *delay = to_delayed_work(work);
struct mlx4_en_priv *priv = container_of(delay, struct mlx4_en_priv,
stats_task);
struct mlx4_en_dev *mdev = priv->mdev;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/mlx4/en_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ static void mlx4_en_free_rx_buf(struct mlx4_en_priv *priv,

void mlx4_en_rx_refill(struct work_struct *work)
{
struct delayed_work *delay = container_of(work, struct delayed_work, work);
struct delayed_work *delay = to_delayed_work(work);
struct mlx4_en_priv *priv = container_of(delay, struct mlx4_en_priv,
refill_task);
struct mlx4_en_dev *mdev = priv->mdev;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/mlx4/sense.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void mlx4_do_sense_ports(struct mlx4_dev *dev,

static void mlx4_sense_port(struct work_struct *work)
{
struct delayed_work *delay = container_of(work, struct delayed_work, work);
struct delayed_work *delay = to_delayed_work(work);
struct mlx4_sense *sense = container_of(delay, struct mlx4_sense,
sense_poll);
struct mlx4_dev *dev = sense->dev;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,7 @@ EXPORT_SYMBOL(phy_start);
*/
static void phy_state_machine(struct work_struct *work)
{
struct delayed_work *dwork =
container_of(work, struct delayed_work, work);
struct delayed_work *dwork = to_delayed_work(work);
struct phy_device *phydev =
container_of(dwork, struct phy_device, state_queue);
int needs_aneg = 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/s390/scsi/zfcp_fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static int zfcp_wka_port_get(struct zfcp_wka_port *wka_port)

static void zfcp_wka_port_offline(struct work_struct *work)
{
struct delayed_work *dw = container_of(work, struct delayed_work, work);
struct delayed_work *dw = to_delayed_work(work);
struct zfcp_wka_port *wka_port =
container_of(dw, struct zfcp_wka_port, work);

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ void ieee80211_softmac_scan(struct ieee80211_device *ieee)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
void ieee80211_softmac_scan_wq(struct work_struct *work)
{
struct delayed_work *dwork = container_of(work, struct delayed_work, work);
struct delayed_work *dwork = to_delayed_work(work);
struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, softmac_scan_wq);
#else
void ieee80211_softmac_scan_wq(struct ieee80211_device *ieee)
Expand Down Expand Up @@ -777,7 +777,7 @@ void ieee80211_softmac_scan_wq(struct ieee80211_device *ieee)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
void ieee80211_softmac_scan_wq(struct work_struct *work)
{
struct delayed_work *dwork = container_of(work, struct delayed_work, work);
struct delayed_work *dwork = to_delayed_work(work);
struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, softmac_scan_wq);
#else
void ieee80211_softmac_scan_wq(struct ieee80211_device *ieee)
Expand Down Expand Up @@ -2980,7 +2980,7 @@ void ieee80211_start_monitor_mode(struct ieee80211_device *ieee)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
void ieee80211_start_ibss_wq(struct work_struct *work)
{
struct delayed_work *dwork = container_of(work, struct delayed_work, work);
struct delayed_work *dwork = to_delayed_work(work);
struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, start_ibss_wq);
#else
void ieee80211_start_ibss_wq(struct ieee80211_device *ieee)
Expand Down Expand Up @@ -3162,7 +3162,7 @@ void ieee80211_disassociate(struct ieee80211_device *ieee)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
void ieee80211_associate_retry_wq(struct work_struct *work)
{
struct delayed_work *dwork = container_of(work, struct delayed_work, work);
struct delayed_work *dwork = to_delayed_work(work);
struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, associate_retry_wq);
#else
void ieee80211_associate_retry_wq(struct ieee80211_device *ieee)
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/rtl8187se/r8180_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5438,7 +5438,7 @@ void rtl8180_hw_wakeup_wq (struct work_struct *work)
// struct r8180_priv *priv = container_of(work, struct r8180_priv, watch_dog_wq);
// struct ieee80211_device * ieee = (struct ieee80211_device*)
// container_of(work, struct ieee80211_device, watch_dog_wq);
struct delayed_work *dwork = container_of(work,struct delayed_work,work);
struct delayed_work *dwork = to_delayed_work(work);
struct ieee80211_device *ieee = container_of(dwork,struct ieee80211_device,hw_wakeup_wq);
struct net_device *dev = ieee->dev;
#else
Expand All @@ -5459,7 +5459,7 @@ void rtl8180_hw_sleep_wq (struct work_struct *work)
// struct r8180_priv *priv = container_of(work, struct r8180_priv, watch_dog_wq);
// struct ieee80211_device * ieee = (struct ieee80211_device*)
// container_of(work, struct ieee80211_device, watch_dog_wq);
struct delayed_work *dwork = container_of(work,struct delayed_work,work);
struct delayed_work *dwork = to_delayed_work(work);
struct ieee80211_device *ieee = container_of(dwork,struct ieee80211_device,hw_sleep_wq);
struct net_device *dev = ieee->dev;
#else
Expand Down Expand Up @@ -6407,7 +6407,7 @@ priv->txnpring)/8);
void rtl8180_tx_irq_wq(struct work_struct *work)
{
//struct r8180_priv *priv = container_of(work, struct r8180_priv, reset_wq);
struct delayed_work *dwork = container_of(work,struct delayed_work,work);
struct delayed_work *dwork = to_delayed_work(work);
struct ieee80211_device * ieee = (struct ieee80211_device*)
container_of(dwork, struct ieee80211_device, watch_dog_wq);
struct net_device *dev = ieee->dev;
Expand Down Expand Up @@ -6691,7 +6691,7 @@ lizhaoming--------------------------- RF power on/power off -----------------
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
void GPIOChangeRFWorkItemCallBack(struct work_struct *work)
{
//struct delayed_work *dwork = container_of(work, struct delayed_work, work);
//struct delayed_work *dwork = to_delayed_work(work);
struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, GPIOChangeRFWorkItem.work);
struct net_device *dev = ieee->dev;
struct r8180_priv *priv = ieee80211_priv(dev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/wusbcore/devconnect.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ static void __wusbhc_keep_alive(struct wusbhc *wusbhc)
*/
static void wusbhc_keep_alive_run(struct work_struct *ws)
{
struct delayed_work *dw = container_of(ws, struct delayed_work, work);
struct delayed_work *dw = to_delayed_work(ws);
struct wusbhc *wusbhc = container_of(dw, struct wusbhc, keep_alive_timer);

mutex_lock(&wusbhc->mutex);
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/workqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ struct delayed_work {
struct timer_list timer;
};

static inline struct delayed_work *to_delayed_work(struct work_struct *work)
{
return container_of(work, struct delayed_work, work);
}

struct execute_work {
struct work_struct work;
};
Expand Down
3 changes: 1 addition & 2 deletions trunk/mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -3992,8 +3992,7 @@ static void cache_reap(struct work_struct *w)
struct kmem_cache *searchp;
struct kmem_list3 *l3;
int node = numa_node_id();
struct delayed_work *work =
container_of(w, struct delayed_work, work);
struct delayed_work *work = to_delayed_work(w);

if (!mutex_trylock(&cache_chain_mutex))
/* Give up. Setup the next iteration. */
Expand Down

0 comments on commit 9966f39

Please sign in to comment.