mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
WorkQueue: Fix up arch-specific work items where possible
Fix up arch-specific work items where possible to use the new work_struct and delayed_work structs. Three places that enqueue bits of their stack and then return have been marked with #error as this is not permitted. Signed-Off-By: David Howells <[email protected]>
This commit is contained in:
parent
9db7372445
commit
6d5aefb8ea
34 changed files with 154 additions and 121 deletions
|
|
@ -385,6 +385,7 @@ struct fcc_enet_private {
|
|||
phy_info_t *phy;
|
||||
struct work_struct phy_relink;
|
||||
struct work_struct phy_display_config;
|
||||
struct net_device *dev;
|
||||
|
||||
uint sequence_done;
|
||||
|
||||
|
|
@ -1391,10 +1392,11 @@ static phy_info_t *phy_info[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
static void mii_display_status(void *data)
|
||||
static void mii_display_status(struct work_struct *work)
|
||||
{
|
||||
struct net_device *dev = data;
|
||||
volatile struct fcc_enet_private *fep = dev->priv;
|
||||
volatile struct fcc_enet_private *fep =
|
||||
container_of(work, struct fcc_enet_private, phy_relink);
|
||||
struct net_device *dev = fep->dev;
|
||||
uint s = fep->phy_status;
|
||||
|
||||
if (!fep->link && !fep->old_link) {
|
||||
|
|
@ -1428,10 +1430,12 @@ static void mii_display_status(void *data)
|
|||
printk(".\n");
|
||||
}
|
||||
|
||||
static void mii_display_config(void *data)
|
||||
static void mii_display_config(struct work_struct *work)
|
||||
{
|
||||
struct net_device *dev = data;
|
||||
volatile struct fcc_enet_private *fep = dev->priv;
|
||||
volatile struct fcc_enet_private *fep =
|
||||
container_of(work, struct fcc_enet_private,
|
||||
phy_display_config);
|
||||
struct net_device *dev = fep->dev;
|
||||
uint s = fep->phy_status;
|
||||
|
||||
printk("%s: config: auto-negotiation ", dev->name);
|
||||
|
|
@ -1758,8 +1762,9 @@ static int __init fec_enet_init(void)
|
|||
cep->phy_id_done = 0;
|
||||
cep->phy_addr = fip->fc_phyaddr;
|
||||
mii_queue(dev, mk_mii_read(MII_PHYSID1), mii_discover_phy);
|
||||
INIT_WORK(&cep->phy_relink, mii_display_status, dev);
|
||||
INIT_WORK(&cep->phy_display_config, mii_display_config, dev);
|
||||
INIT_WORK(&cep->phy_relink, mii_display_status);
|
||||
INIT_WORK(&cep->phy_display_config, mii_display_config);
|
||||
cep->dev = dev;
|
||||
#endif /* CONFIG_USE_MDIO */
|
||||
|
||||
fip++;
|
||||
|
|
|
|||
|
|
@ -173,6 +173,7 @@ struct fec_enet_private {
|
|||
uint phy_speed;
|
||||
phy_info_t *phy;
|
||||
struct work_struct phy_task;
|
||||
struct net_device *dev;
|
||||
|
||||
uint sequence_done;
|
||||
|
||||
|
|
@ -1263,10 +1264,11 @@ static void mii_display_status(struct net_device *dev)
|
|||
printk(".\n");
|
||||
}
|
||||
|
||||
static void mii_display_config(void *priv)
|
||||
static void mii_display_config(struct work_struct *work)
|
||||
{
|
||||
struct net_device *dev = (struct net_device *)priv;
|
||||
struct fec_enet_private *fep = dev->priv;
|
||||
struct fec_enet_private *fep =
|
||||
container_of(work, struct fec_enet_private, phy_task);
|
||||
struct net_device *dev = fep->dev;
|
||||
volatile uint *s = &(fep->phy_status);
|
||||
|
||||
printk("%s: config: auto-negotiation ", dev->name);
|
||||
|
|
@ -1295,10 +1297,11 @@ static void mii_display_config(void *priv)
|
|||
fep->sequence_done = 1;
|
||||
}
|
||||
|
||||
static void mii_relink(void *priv)
|
||||
static void mii_relink(struct work_struct *work)
|
||||
{
|
||||
struct net_device *dev = (struct net_device *)priv;
|
||||
struct fec_enet_private *fep = dev->priv;
|
||||
struct fec_enet_private *fep =
|
||||
container_of(work, struct fec_enet_private, phy_task);
|
||||
struct net_device *dev = fep->dev;
|
||||
int duplex;
|
||||
|
||||
fep->link = (fep->phy_status & PHY_STAT_LINK) ? 1 : 0;
|
||||
|
|
@ -1325,7 +1328,8 @@ static void mii_queue_relink(uint mii_reg, struct net_device *dev)
|
|||
{
|
||||
struct fec_enet_private *fep = dev->priv;
|
||||
|
||||
INIT_WORK(&fep->phy_task, mii_relink, (void *)dev);
|
||||
fep->dev = dev;
|
||||
INIT_WORK(&fep->phy_task, mii_relink);
|
||||
schedule_work(&fep->phy_task);
|
||||
}
|
||||
|
||||
|
|
@ -1333,7 +1337,8 @@ static void mii_queue_config(uint mii_reg, struct net_device *dev)
|
|||
{
|
||||
struct fec_enet_private *fep = dev->priv;
|
||||
|
||||
INIT_WORK(&fep->phy_task, mii_display_config, (void *)dev);
|
||||
fep->dev = dev;
|
||||
INIT_WORK(&fep->phy_task, mii_display_config);
|
||||
schedule_work(&fep->phy_task);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue