forked from Minki/linux
watchdog: Add 'action' and 'data' parameters to restart handler callback
The 'action' (or restart mode) and data parameters may be used by restart handlers, so they should be passed to the restart callback functions. Cc: Sylvain Lemieux <slemieux@tycoint.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
This commit is contained in:
parent
0ce72f3544
commit
4d8b229d5e
@ -87,7 +87,8 @@ static int bcm47xx_wdt_hard_set_timeout(struct watchdog_device *wdd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int bcm47xx_wdt_restart(struct watchdog_device *wdd)
|
||||
static int bcm47xx_wdt_restart(struct watchdog_device *wdd,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd);
|
||||
|
||||
|
@ -119,7 +119,8 @@ static int da9063_wdt_set_timeout(struct watchdog_device *wdd,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int da9063_wdt_restart(struct watchdog_device *wdd)
|
||||
static int da9063_wdt_restart(struct watchdog_device *wdd, unsigned long action,
|
||||
void *data)
|
||||
{
|
||||
struct da9063_watchdog *wdt = watchdog_get_drvdata(wdd);
|
||||
int ret;
|
||||
|
@ -48,7 +48,8 @@ static void dc_wdt_set(struct dc_wdt *wdt, u32 ticks)
|
||||
spin_unlock_irqrestore(&wdt->lock, flags);
|
||||
}
|
||||
|
||||
static int dc_wdt_restart(struct watchdog_device *wdog)
|
||||
static int dc_wdt_restart(struct watchdog_device *wdog, unsigned long action,
|
||||
void *data)
|
||||
{
|
||||
struct dc_wdt *wdt = watchdog_get_drvdata(wdog);
|
||||
|
||||
|
@ -150,7 +150,8 @@ static int pdc_wdt_start(struct watchdog_device *wdt_dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pdc_wdt_restart(struct watchdog_device *wdt_dev)
|
||||
static int pdc_wdt_restart(struct watchdog_device *wdt_dev,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
struct pdc_wdt_dev *wdt = watchdog_get_drvdata(wdt_dev);
|
||||
|
||||
|
@ -80,7 +80,8 @@ static const struct watchdog_info imx2_wdt_info = {
|
||||
.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
|
||||
};
|
||||
|
||||
static int imx2_wdt_restart(struct watchdog_device *wdog)
|
||||
static int imx2_wdt_restart(struct watchdog_device *wdog, unsigned long action,
|
||||
void *data)
|
||||
{
|
||||
struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog);
|
||||
unsigned int wcr_enable = IMX2_WDT_WCR_WDE;
|
||||
|
@ -153,7 +153,8 @@ static int lpc18xx_wdt_start(struct watchdog_device *wdt_dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lpc18xx_wdt_restart(struct watchdog_device *wdt_dev)
|
||||
static int lpc18xx_wdt_restart(struct watchdog_device *wdt_dev,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
struct lpc18xx_wdt_dev *lpc18xx_wdt = watchdog_get_drvdata(wdt_dev);
|
||||
unsigned long flags;
|
||||
|
@ -62,7 +62,8 @@ struct meson_wdt_dev {
|
||||
const struct meson_wdt_data *data;
|
||||
};
|
||||
|
||||
static int meson_wdt_restart(struct watchdog_device *wdt_dev)
|
||||
static int meson_wdt_restart(struct watchdog_device *wdt_dev,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
struct meson_wdt_dev *meson_wdt = watchdog_get_drvdata(wdt_dev);
|
||||
u32 tc_reboot = MESON_WDT_DC_RESET;
|
||||
|
@ -31,7 +31,8 @@ struct moxart_wdt_dev {
|
||||
|
||||
static int heartbeat;
|
||||
|
||||
static int moxart_wdt_restart(struct watchdog_device *wdt_dev)
|
||||
static int moxart_wdt_restart(struct watchdog_device *wdt_dev,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
struct moxart_wdt_dev *moxart_wdt = watchdog_get_drvdata(wdt_dev);
|
||||
|
||||
|
@ -64,7 +64,8 @@ struct mtk_wdt_dev {
|
||||
void __iomem *wdt_base;
|
||||
};
|
||||
|
||||
static int mtk_wdt_restart(struct watchdog_device *wdt_dev)
|
||||
static int mtk_wdt_restart(struct watchdog_device *wdt_dev,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
struct mtk_wdt_dev *mtk_wdt = watchdog_get_drvdata(wdt_dev);
|
||||
void __iomem *wdt_base;
|
||||
|
@ -70,7 +70,8 @@ static int qcom_wdt_set_timeout(struct watchdog_device *wdd,
|
||||
return qcom_wdt_start(wdd);
|
||||
}
|
||||
|
||||
static int qcom_wdt_restart(struct watchdog_device *wdd)
|
||||
static int qcom_wdt_restart(struct watchdog_device *wdd, unsigned long action,
|
||||
void *data)
|
||||
{
|
||||
struct qcom_wdt *wdt = to_qcom_wdt(wdd);
|
||||
u32 timeout;
|
||||
|
@ -349,7 +349,8 @@ static int s3c2410wdt_set_heartbeat(struct watchdog_device *wdd, unsigned timeou
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int s3c2410wdt_restart(struct watchdog_device *wdd)
|
||||
static int s3c2410wdt_restart(struct watchdog_device *wdd, unsigned long action,
|
||||
void *data)
|
||||
{
|
||||
struct s3c2410_wdt *wdt = watchdog_get_drvdata(wdd);
|
||||
void __iomem *wdt_base = wdt->reg_base;
|
||||
|
@ -83,7 +83,8 @@ static const int wdt_timeout_map[] = {
|
||||
};
|
||||
|
||||
|
||||
static int sunxi_wdt_restart(struct watchdog_device *wdt_dev)
|
||||
static int sunxi_wdt_restart(struct watchdog_device *wdt_dev,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
struct sunxi_wdt_dev *sunxi_wdt = watchdog_get_drvdata(wdt_dev);
|
||||
void __iomem *wdt_base = sunxi_wdt->wdt_base;
|
||||
|
@ -164,7 +164,7 @@ static int watchdog_restart_notifier(struct notifier_block *nb,
|
||||
|
||||
int ret;
|
||||
|
||||
ret = wdd->ops->restart(wdd);
|
||||
ret = wdd->ops->restart(wdd, action, data);
|
||||
if (ret)
|
||||
return NOTIFY_BAD;
|
||||
|
||||
|
@ -46,7 +46,7 @@ struct watchdog_ops {
|
||||
unsigned int (*status)(struct watchdog_device *);
|
||||
int (*set_timeout)(struct watchdog_device *, unsigned int);
|
||||
unsigned int (*get_timeleft)(struct watchdog_device *);
|
||||
int (*restart)(struct watchdog_device *);
|
||||
int (*restart)(struct watchdog_device *, unsigned long, void *);
|
||||
long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user