All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <1257882180.14374.3@antares>

diff --git a/a/1.txt b/N1/1.txt
index 3ee6c67..cb596ea 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -1,14 +1,12 @@
 Use the MPC5200 GPT api for the WDT which drastically simplifies this file.
 
-Signed-off-by: Albrecht Dre=DF <albrecht.dress@arcor.de>
+Signed-off-by: Albrecht Dreß <albrecht.dress@arcor.de>
 ---
 
- drivers/watchdog/mpc5200_wdt.c |  246 +++++++++++-------------------------=
-----
+ drivers/watchdog/mpc5200_wdt.c |  246 +++++++++++-----------------------------
  1 files changed, 65 insertions(+), 181 deletions(-)
 
-diff --git a/drivers/watchdog/mpc5200_wdt.c b/drivers/watchdog/mpc5200_wdt.=
-c
+diff --git a/drivers/watchdog/mpc5200_wdt.c b/drivers/watchdog/mpc5200_wdt.c
 index fa9c47c..5bb553c 100644
 --- a/drivers/watchdog/mpc5200_wdt.c
 +++ b/drivers/watchdog/mpc5200_wdt.c
@@ -21,14 +19,14 @@ index fa9c47c..5bb553c 100644
  #include <linux/of_platform.h>
  #include <linux/uaccess.h>
  #include <asm/mpc52xx.h>
-=20
-=20
+ 
+ 
 -#define GPT_MODE_WDT		(1 << 15)
 -#define GPT_MODE_CE		(1 << 12)
 -#define GPT_MODE_MS_TIMER	(0x4)
 -
 +#define WDT_IDENTITY        "mpc5200 watchdog on GPT0"
-=20
+ 
  struct mpc5200_wdt {
 -	unsigned count;	/* timer ticks before watchdog kicks in */
 -	long ipb_freq;
@@ -39,20 +37,20 @@ index fa9c47c..5bb553c 100644
 +	int timeout;
 +	struct mpc52xx_gpt_priv *timer;
  };
-=20
+ 
  /* is_active stores wether or not the /dev/watchdog device is opened */
 @@ -32,80 +23,33 @@ static unsigned long is_active;
  static struct mpc5200_wdt *wdt_global;
-=20
-=20
+ 
+ 
 -/* helper to calculate timeout in timer counts */
 -static void mpc5200_wdt_set_timeout(struct mpc5200_wdt *wdt, int timeout)
 -{
 -	/* use biggest prescaler of 64k */
--	wdt->count =3D (wdt->ipb_freq + 0xffff) / 0x10000 * timeout;
+-	wdt->count = (wdt->ipb_freq + 0xffff) / 0x10000 * timeout;
 -
 -	if (wdt->count > 0xffff)
--		wdt->count =3D 0xffff;
+-		wdt->count = 0xffff;
 -}
 -/* return timeout in seconds (calculated from timer count) */
 -static int mpc5200_wdt_get_timeout(struct mpc5200_wdt *wdt)
@@ -96,73 +94,70 @@ index fa9c47c..5bb553c 100644
 -
 -
  /* file operations */
- static ssize_t mpc5200_wdt_write(struct file *file, const char __user *dat=
-a,
+ static ssize_t mpc5200_wdt_write(struct file *file, const char __user *data,
 -		size_t len, loff_t *ppos)
 +				 size_t len, loff_t *ppos)
  {
- 	struct mpc5200_wdt *wdt =3D file->private_data;
+ 	struct mpc5200_wdt *wdt = file->private_data;
 -	mpc5200_wdt_ping(wdt);
 +	mpc52xx_gpt_wdt_ping(wdt->timer);
  	return 0;
  }
 +
- static struct watchdog_info mpc5200_wdt_info =3D {
- 	.options	=3D WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
--	.identity	=3D "mpc5200 watchdog on GPT0",
-+	.identity	=3D WDT_IDENTITY,
+ static struct watchdog_info mpc5200_wdt_info = {
+ 	.options	= WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
+-	.identity	= "mpc5200 watchdog on GPT0",
++	.identity	= WDT_IDENTITY,
  };
 +
  static long mpc5200_wdt_ioctl(struct file *file, unsigned int cmd,
 -							unsigned long arg)
 +			      unsigned long arg)
  {
- 	struct mpc5200_wdt *wdt =3D file->private_data;
- 	int __user *data =3D (int __user *)arg;
+ 	struct mpc5200_wdt *wdt = file->private_data;
+ 	int __user *data = (int __user *)arg;
  	int timeout;
 +	u64 real_timeout;
- 	int ret =3D 0;
-=20
+ 	int ret = 0;
+ 
  	switch (cmd) {
  	case WDIOC_GETSUPPORT:
- 		ret =3D copy_to_user(data, &mpc5200_wdt_info,
+ 		ret = copy_to_user(data, &mpc5200_wdt_info,
 -						sizeof(mpc5200_wdt_info));
 +				   sizeof(mpc5200_wdt_info));
  		if (ret)
- 			ret =3D -EFAULT;
+ 			ret = -EFAULT;
  		break;
-@@ -116,19 +60,23 @@ static long mpc5200_wdt_ioctl(struct file *file, unsig=
-ned int cmd,
+@@ -116,19 +60,23 @@ static long mpc5200_wdt_ioctl(struct file *file, unsigned int cmd,
  		break;
-=20
+ 
  	case WDIOC_KEEPALIVE:
 -		mpc5200_wdt_ping(wdt);
 +		mpc52xx_gpt_wdt_ping(wdt->timer);
  		break;
-=20
+ 
  	case WDIOC_SETTIMEOUT:
- 		ret =3D get_user(timeout, data);
+ 		ret = get_user(timeout, data);
  		if (ret)
  			break;
 -		mpc5200_wdt_set_timeout(wdt, timeout);
 -		mpc5200_wdt_start(wdt);
-+		ret =3D mpc52xx_gpt_wdt_start(wdt->timer, timeout);
++		ret = mpc52xx_gpt_wdt_start(wdt->timer, timeout);
 +		if (ret)
 +			break;
-+		wdt->timeout =3D timeout;
++		wdt->timeout = timeout;
  		/* fall through and return the timeout */
-=20
+ 
  	case WDIOC_GETTIMEOUT:
--		timeout =3D mpc5200_wdt_get_timeout(wdt);
-+		real_timeout =3D mpc52xx_gpt_timer_period(wdt->timer);
+-		timeout = mpc5200_wdt_get_timeout(wdt);
++		real_timeout = mpc52xx_gpt_timer_period(wdt->timer);
 +		do_div(real_timeout, 1000000000);
-+		timeout =3D (int) real_timeout;
- 		ret =3D put_user(timeout, data);
++		timeout = (int) real_timeout;
+ 		ret = put_user(timeout, data);
  		break;
-=20
-@@ -140,154 +88,90 @@ static long mpc5200_wdt_ioctl(struct file *file, unsi=
-gned int cmd,
-=20
+ 
+@@ -140,154 +88,90 @@ static long mpc5200_wdt_ioctl(struct file *file, unsigned int cmd,
+ 
  static int mpc5200_wdt_open(struct inode *inode, struct file *file)
  {
 +	int ret;
@@ -170,54 +165,54 @@ gned int cmd,
  	/* /dev/watchdog can only be opened once */
  	if (test_and_set_bit(0, &is_active))
  		return -EBUSY;
-=20
+ 
  	/* Set and activate the watchdog */
 -	mpc5200_wdt_set_timeout(wdt_global, 30);
 -	mpc5200_wdt_start(wdt_global);
-+	ret =3D mpc52xx_gpt_wdt_start(wdt_global->timer, 30);
++	ret = mpc52xx_gpt_wdt_start(wdt_global->timer, 30);
 +	if (ret) {
 +		clear_bit(0, &is_active);
 +		return ret;
 +	}
-+	wdt_global->timeout =3D 30;
++	wdt_global->timeout = 30;
 +
- 	file->private_data =3D wdt_global;
+ 	file->private_data = wdt_global;
  	return nonseekable_open(inode, file);
  }
 +
  static int mpc5200_wdt_release(struct inode *inode, struct file *file)
  {
--#if WATCHDOG_NOWAYOUT =3D=3D 0
+-#if WATCHDOG_NOWAYOUT == 0
 +#if !defined(CONFIG_WATCHDOG_NOWAYOUT)
- 	struct mpc5200_wdt *wdt =3D file->private_data;
+ 	struct mpc5200_wdt *wdt = file->private_data;
 -	mpc5200_wdt_stop(wdt);
--	wdt->count =3D 0;		/* =3D=3D disabled */
+-	wdt->count = 0;		/* == disabled */
 +	mpc52xx_gpt_wdt_stop(wdt->timer);
-+	wdt->timeout =3D 0;		/* =3D=3D disabled */
++	wdt->timeout = 0;		/* == disabled */
  #endif
  	clear_bit(0, &is_active);
  	return 0;
  }
-=20
- static const struct file_operations mpc5200_wdt_fops =3D {
--	.owner	=3D THIS_MODULE,
--	.write	=3D mpc5200_wdt_write,
-+	.owner		=3D THIS_MODULE,
-+	.llseek		=3D no_llseek,
-+	.write		=3D mpc5200_wdt_write,
- 	.unlocked_ioctl	=3D mpc5200_wdt_ioctl,
--	.open	=3D mpc5200_wdt_open,
--	.release =3D mpc5200_wdt_release,
-+	.open		=3D mpc5200_wdt_open,
-+	.release	=3D mpc5200_wdt_release,
+ 
+ static const struct file_operations mpc5200_wdt_fops = {
+-	.owner	= THIS_MODULE,
+-	.write	= mpc5200_wdt_write,
++	.owner		= THIS_MODULE,
++	.llseek		= no_llseek,
++	.write		= mpc5200_wdt_write,
+ 	.unlocked_ioctl	= mpc5200_wdt_ioctl,
+-	.open	= mpc5200_wdt_open,
+-	.release = mpc5200_wdt_release,
++	.open		= mpc5200_wdt_open,
++	.release	= mpc5200_wdt_release,
 +};
 +
-+static struct miscdevice mpc5200_wdt_miscdev =3D {
-+	.minor		=3D WATCHDOG_MINOR,
-+	.name		=3D "watchdog",
-+	.fops		=3D &mpc5200_wdt_fops,
++static struct miscdevice mpc5200_wdt_miscdev = {
++	.minor		= WATCHDOG_MINOR,
++	.name		= "watchdog",
++	.fops		= &mpc5200_wdt_fops,
  };
-=20
+ 
  /* module operations */
 -static int mpc5200_wdt_probe(struct of_device *op,
 -					const struct of_device_id *match)
@@ -228,54 +223,54 @@ gned int cmd,
 -	const void *has_wdt;
 -	int size;
 +	struct mpc52xx_gpt_priv *timer;
-=20
--	has_wdt =3D of_get_property(op->node, "has-wdt", NULL);
+ 
+-	has_wdt = of_get_property(op->node, "has-wdt", NULL);
 -	if (!has_wdt)
--		has_wdt =3D of_get_property(op->node, "fsl,has-wdt", NULL);
+-		has_wdt = of_get_property(op->node, "fsl,has-wdt", NULL);
 -	if (!has_wdt)
 +	/* grab the watchdog-capable gpt */
-+	timer =3D mpc52xx_gpt_wdt_probe();
++	timer = mpc52xx_gpt_wdt_probe();
 +	if (!timer) {
 +		pr_err(WDT_IDENTITY ": probing failed\n");
  		return -ENODEV;
 +	}
-=20
--	wdt =3D kzalloc(sizeof(*wdt), GFP_KERNEL);
+ 
+-	wdt = kzalloc(sizeof(*wdt), GFP_KERNEL);
 -	if (!wdt)
-+	wdt_global =3D kzalloc(sizeof(struct mpc5200_wdt), GFP_KERNEL);
++	wdt_global = kzalloc(sizeof(struct mpc5200_wdt), GFP_KERNEL);
 +	if (!wdt_global) {
 +		mpc52xx_gpt_wdt_release(timer);
  		return -ENOMEM;
 -
--	wdt->ipb_freq =3D mpc5xxx_get_bus_frequency(op->node);
+-	wdt->ipb_freq = mpc5xxx_get_bus_frequency(op->node);
 -
--	err =3D of_address_to_resource(op->node, 0, &wdt->mem);
+-	err = of_address_to_resource(op->node, 0, &wdt->mem);
 -	if (err)
 -		goto out_free;
--	size =3D wdt->mem.end - wdt->mem.start + 1;
+-	size = wdt->mem.end - wdt->mem.start + 1;
 -	if (!request_mem_region(wdt->mem.start, size, "mpc5200_wdt")) {
--		err =3D -ENODEV;
+-		err = -ENODEV;
 -		goto out_free;
 -	}
--	wdt->regs =3D ioremap(wdt->mem.start, size);
+-	wdt->regs = ioremap(wdt->mem.start, size);
 -	if (!wdt->regs) {
--		err =3D -ENODEV;
+-		err = -ENODEV;
 -		goto out_release;
  	}
 -
 -	dev_set_drvdata(&op->dev, wdt);
 -	spin_lock_init(&wdt->io_lock);
 -
--	wdt->miscdev =3D (struct miscdevice) {
--		.minor	=3D WATCHDOG_MINOR,
--		.name	=3D "watchdog",
--		.fops	=3D &mpc5200_wdt_fops,
--		.parent =3D &op->dev,
+-	wdt->miscdev = (struct miscdevice) {
+-		.minor	= WATCHDOG_MINOR,
+-		.name	= "watchdog",
+-		.fops	= &mpc5200_wdt_fops,
+-		.parent = &op->dev,
 -	};
--	wdt_global =3D wdt;
--	err =3D misc_register(&wdt->miscdev);
-+	wdt_global->timer =3D timer;
-+	err =3D misc_register(&mpc5200_wdt_miscdev);
+-	wdt_global = wdt;
+-	err = misc_register(&wdt->miscdev);
++	wdt_global->timer = timer;
++	err = misc_register(&mpc5200_wdt_miscdev);
  	if (!err)
 -		return 0;
 -
@@ -291,10 +286,10 @@ gned int cmd,
 +	}
  	return err;
  }
-=20
+ 
 -static int mpc5200_wdt_remove(struct of_device *op)
 -{
--	struct mpc5200_wdt *wdt =3D dev_get_drvdata(&op->dev);
+-	struct mpc5200_wdt *wdt = dev_get_drvdata(&op->dev);
 -
 -	mpc5200_wdt_stop(wdt);
 -	misc_deregister(&wdt->miscdev);
@@ -306,38 +301,38 @@ gned int cmd,
 -}
 -static int mpc5200_wdt_suspend(struct of_device *op, pm_message_t state)
 -{
--	struct mpc5200_wdt *wdt =3D dev_get_drvdata(&op->dev);
+-	struct mpc5200_wdt *wdt = dev_get_drvdata(&op->dev);
 -	mpc5200_wdt_stop(wdt);
 -	return 0;
 -}
 -static int mpc5200_wdt_resume(struct of_device *op)
 -{
--	struct mpc5200_wdt *wdt =3D dev_get_drvdata(&op->dev);
+-	struct mpc5200_wdt *wdt = dev_get_drvdata(&op->dev);
 -	if (wdt->count)
 -		mpc5200_wdt_start(wdt);
 -	return 0;
 -}
 -static int mpc5200_wdt_shutdown(struct of_device *op)
 -{
--	struct mpc5200_wdt *wdt =3D dev_get_drvdata(&op->dev);
+-	struct mpc5200_wdt *wdt = dev_get_drvdata(&op->dev);
 -	mpc5200_wdt_stop(wdt);
 -	return 0;
 -}
 -
--static struct of_device_id mpc5200_wdt_match[] =3D {
--	{ .compatible =3D "mpc5200-gpt", },
--	{ .compatible =3D "fsl,mpc5200-gpt", },
+-static struct of_device_id mpc5200_wdt_match[] = {
+-	{ .compatible = "mpc5200-gpt", },
+-	{ .compatible = "fsl,mpc5200-gpt", },
 -	{},
 -};
--static struct of_platform_driver mpc5200_wdt_driver =3D {
--	.owner		=3D THIS_MODULE,
--	.name		=3D "mpc5200-gpt-wdt",
--	.match_table	=3D mpc5200_wdt_match,
--	.probe		=3D mpc5200_wdt_probe,
--	.remove		=3D mpc5200_wdt_remove,
--	.suspend	=3D mpc5200_wdt_suspend,
--	.resume		=3D mpc5200_wdt_resume,
--	.shutdown	=3D mpc5200_wdt_shutdown,
+-static struct of_platform_driver mpc5200_wdt_driver = {
+-	.owner		= THIS_MODULE,
+-	.name		= "mpc5200-gpt-wdt",
+-	.match_table	= mpc5200_wdt_match,
+-	.probe		= mpc5200_wdt_probe,
+-	.remove		= mpc5200_wdt_remove,
+-	.suspend	= mpc5200_wdt_suspend,
+-	.resume		= mpc5200_wdt_resume,
+-	.shutdown	= mpc5200_wdt_shutdown,
 -};
 -
 -
@@ -353,12 +348,12 @@ gned int cmd,
 +	misc_deregister(&mpc5200_wdt_miscdev);
 +	kfree(wdt_global);
  }
-=20
+ 
  module_init(mpc5200_wdt_init);
  module_exit(mpc5200_wdt_exit);
-=20
+ 
 -MODULE_AUTHOR("Domen Puncer <domen.puncer@telargo.com>");
 +MODULE_AUTHOR("Domen Puncer <domen.puncer@telargo.com>, "
-+	      "Albrecht Dre=DF <albrecht.dress@arcor.de>");
++	      "Albrecht Dreß <albrecht.dress@arcor.de>");
  MODULE_LICENSE("Dual BSD/GPL");
  MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
diff --git a/a/content_digest b/N1/content_digest
index bd735be..e14e933 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -9,15 +9,13 @@
  "b\0"
  "Use the MPC5200 GPT api for the WDT which drastically simplifies this file.\n"
  "\n"
- "Signed-off-by: Albrecht Dre=DF <albrecht.dress@arcor.de>\n"
+ "Signed-off-by: Albrecht Dre\303\237 <albrecht.dress@arcor.de>\n"
  "---\n"
  "\n"
- " drivers/watchdog/mpc5200_wdt.c |  246 +++++++++++-------------------------=\n"
- "----\n"
+ " drivers/watchdog/mpc5200_wdt.c |  246 +++++++++++-----------------------------\n"
  " 1 files changed, 65 insertions(+), 181 deletions(-)\n"
  "\n"
- "diff --git a/drivers/watchdog/mpc5200_wdt.c b/drivers/watchdog/mpc5200_wdt.=\n"
- "c\n"
+ "diff --git a/drivers/watchdog/mpc5200_wdt.c b/drivers/watchdog/mpc5200_wdt.c\n"
  "index fa9c47c..5bb553c 100644\n"
  "--- a/drivers/watchdog/mpc5200_wdt.c\n"
  "+++ b/drivers/watchdog/mpc5200_wdt.c\n"
@@ -30,14 +28,14 @@
  " #include <linux/of_platform.h>\n"
  " #include <linux/uaccess.h>\n"
  " #include <asm/mpc52xx.h>\n"
- "=20\n"
- "=20\n"
+ " \n"
+ " \n"
  "-#define GPT_MODE_WDT\t\t(1 << 15)\n"
  "-#define GPT_MODE_CE\t\t(1 << 12)\n"
  "-#define GPT_MODE_MS_TIMER\t(0x4)\n"
  "-\n"
  "+#define WDT_IDENTITY        \"mpc5200 watchdog on GPT0\"\n"
- "=20\n"
+ " \n"
  " struct mpc5200_wdt {\n"
  "-\tunsigned count;\t/* timer ticks before watchdog kicks in */\n"
  "-\tlong ipb_freq;\n"
@@ -48,20 +46,20 @@
  "+\tint timeout;\n"
  "+\tstruct mpc52xx_gpt_priv *timer;\n"
  " };\n"
- "=20\n"
+ " \n"
  " /* is_active stores wether or not the /dev/watchdog device is opened */\n"
  "@@ -32,80 +23,33 @@ static unsigned long is_active;\n"
  " static struct mpc5200_wdt *wdt_global;\n"
- "=20\n"
- "=20\n"
+ " \n"
+ " \n"
  "-/* helper to calculate timeout in timer counts */\n"
  "-static void mpc5200_wdt_set_timeout(struct mpc5200_wdt *wdt, int timeout)\n"
  "-{\n"
  "-\t/* use biggest prescaler of 64k */\n"
- "-\twdt->count =3D (wdt->ipb_freq + 0xffff) / 0x10000 * timeout;\n"
+ "-\twdt->count = (wdt->ipb_freq + 0xffff) / 0x10000 * timeout;\n"
  "-\n"
  "-\tif (wdt->count > 0xffff)\n"
- "-\t\twdt->count =3D 0xffff;\n"
+ "-\t\twdt->count = 0xffff;\n"
  "-}\n"
  "-/* return timeout in seconds (calculated from timer count) */\n"
  "-static int mpc5200_wdt_get_timeout(struct mpc5200_wdt *wdt)\n"
@@ -105,73 +103,70 @@
  "-\n"
  "-\n"
  " /* file operations */\n"
- " static ssize_t mpc5200_wdt_write(struct file *file, const char __user *dat=\n"
- "a,\n"
+ " static ssize_t mpc5200_wdt_write(struct file *file, const char __user *data,\n"
  "-\t\tsize_t len, loff_t *ppos)\n"
  "+\t\t\t\t size_t len, loff_t *ppos)\n"
  " {\n"
- " \tstruct mpc5200_wdt *wdt =3D file->private_data;\n"
+ " \tstruct mpc5200_wdt *wdt = file->private_data;\n"
  "-\tmpc5200_wdt_ping(wdt);\n"
  "+\tmpc52xx_gpt_wdt_ping(wdt->timer);\n"
  " \treturn 0;\n"
  " }\n"
  "+\n"
- " static struct watchdog_info mpc5200_wdt_info =3D {\n"
- " \t.options\t=3D WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,\n"
- "-\t.identity\t=3D \"mpc5200 watchdog on GPT0\",\n"
- "+\t.identity\t=3D WDT_IDENTITY,\n"
+ " static struct watchdog_info mpc5200_wdt_info = {\n"
+ " \t.options\t= WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,\n"
+ "-\t.identity\t= \"mpc5200 watchdog on GPT0\",\n"
+ "+\t.identity\t= WDT_IDENTITY,\n"
  " };\n"
  "+\n"
  " static long mpc5200_wdt_ioctl(struct file *file, unsigned int cmd,\n"
  "-\t\t\t\t\t\t\tunsigned long arg)\n"
  "+\t\t\t      unsigned long arg)\n"
  " {\n"
- " \tstruct mpc5200_wdt *wdt =3D file->private_data;\n"
- " \tint __user *data =3D (int __user *)arg;\n"
+ " \tstruct mpc5200_wdt *wdt = file->private_data;\n"
+ " \tint __user *data = (int __user *)arg;\n"
  " \tint timeout;\n"
  "+\tu64 real_timeout;\n"
- " \tint ret =3D 0;\n"
- "=20\n"
+ " \tint ret = 0;\n"
+ " \n"
  " \tswitch (cmd) {\n"
  " \tcase WDIOC_GETSUPPORT:\n"
- " \t\tret =3D copy_to_user(data, &mpc5200_wdt_info,\n"
+ " \t\tret = copy_to_user(data, &mpc5200_wdt_info,\n"
  "-\t\t\t\t\t\tsizeof(mpc5200_wdt_info));\n"
  "+\t\t\t\t   sizeof(mpc5200_wdt_info));\n"
  " \t\tif (ret)\n"
- " \t\t\tret =3D -EFAULT;\n"
+ " \t\t\tret = -EFAULT;\n"
  " \t\tbreak;\n"
- "@@ -116,19 +60,23 @@ static long mpc5200_wdt_ioctl(struct file *file, unsig=\n"
- "ned int cmd,\n"
+ "@@ -116,19 +60,23 @@ static long mpc5200_wdt_ioctl(struct file *file, unsigned int cmd,\n"
  " \t\tbreak;\n"
- "=20\n"
+ " \n"
  " \tcase WDIOC_KEEPALIVE:\n"
  "-\t\tmpc5200_wdt_ping(wdt);\n"
  "+\t\tmpc52xx_gpt_wdt_ping(wdt->timer);\n"
  " \t\tbreak;\n"
- "=20\n"
+ " \n"
  " \tcase WDIOC_SETTIMEOUT:\n"
- " \t\tret =3D get_user(timeout, data);\n"
+ " \t\tret = get_user(timeout, data);\n"
  " \t\tif (ret)\n"
  " \t\t\tbreak;\n"
  "-\t\tmpc5200_wdt_set_timeout(wdt, timeout);\n"
  "-\t\tmpc5200_wdt_start(wdt);\n"
- "+\t\tret =3D mpc52xx_gpt_wdt_start(wdt->timer, timeout);\n"
+ "+\t\tret = mpc52xx_gpt_wdt_start(wdt->timer, timeout);\n"
  "+\t\tif (ret)\n"
  "+\t\t\tbreak;\n"
- "+\t\twdt->timeout =3D timeout;\n"
+ "+\t\twdt->timeout = timeout;\n"
  " \t\t/* fall through and return the timeout */\n"
- "=20\n"
+ " \n"
  " \tcase WDIOC_GETTIMEOUT:\n"
- "-\t\ttimeout =3D mpc5200_wdt_get_timeout(wdt);\n"
- "+\t\treal_timeout =3D mpc52xx_gpt_timer_period(wdt->timer);\n"
+ "-\t\ttimeout = mpc5200_wdt_get_timeout(wdt);\n"
+ "+\t\treal_timeout = mpc52xx_gpt_timer_period(wdt->timer);\n"
  "+\t\tdo_div(real_timeout, 1000000000);\n"
- "+\t\ttimeout =3D (int) real_timeout;\n"
- " \t\tret =3D put_user(timeout, data);\n"
+ "+\t\ttimeout = (int) real_timeout;\n"
+ " \t\tret = put_user(timeout, data);\n"
  " \t\tbreak;\n"
- "=20\n"
- "@@ -140,154 +88,90 @@ static long mpc5200_wdt_ioctl(struct file *file, unsi=\n"
- "gned int cmd,\n"
- "=20\n"
+ " \n"
+ "@@ -140,154 +88,90 @@ static long mpc5200_wdt_ioctl(struct file *file, unsigned int cmd,\n"
+ " \n"
  " static int mpc5200_wdt_open(struct inode *inode, struct file *file)\n"
  " {\n"
  "+\tint ret;\n"
@@ -179,54 +174,54 @@
  " \t/* /dev/watchdog can only be opened once */\n"
  " \tif (test_and_set_bit(0, &is_active))\n"
  " \t\treturn -EBUSY;\n"
- "=20\n"
+ " \n"
  " \t/* Set and activate the watchdog */\n"
  "-\tmpc5200_wdt_set_timeout(wdt_global, 30);\n"
  "-\tmpc5200_wdt_start(wdt_global);\n"
- "+\tret =3D mpc52xx_gpt_wdt_start(wdt_global->timer, 30);\n"
+ "+\tret = mpc52xx_gpt_wdt_start(wdt_global->timer, 30);\n"
  "+\tif (ret) {\n"
  "+\t\tclear_bit(0, &is_active);\n"
  "+\t\treturn ret;\n"
  "+\t}\n"
- "+\twdt_global->timeout =3D 30;\n"
+ "+\twdt_global->timeout = 30;\n"
  "+\n"
- " \tfile->private_data =3D wdt_global;\n"
+ " \tfile->private_data = wdt_global;\n"
  " \treturn nonseekable_open(inode, file);\n"
  " }\n"
  "+\n"
  " static int mpc5200_wdt_release(struct inode *inode, struct file *file)\n"
  " {\n"
- "-#if WATCHDOG_NOWAYOUT =3D=3D 0\n"
+ "-#if WATCHDOG_NOWAYOUT == 0\n"
  "+#if !defined(CONFIG_WATCHDOG_NOWAYOUT)\n"
- " \tstruct mpc5200_wdt *wdt =3D file->private_data;\n"
+ " \tstruct mpc5200_wdt *wdt = file->private_data;\n"
  "-\tmpc5200_wdt_stop(wdt);\n"
- "-\twdt->count =3D 0;\t\t/* =3D=3D disabled */\n"
+ "-\twdt->count = 0;\t\t/* == disabled */\n"
  "+\tmpc52xx_gpt_wdt_stop(wdt->timer);\n"
- "+\twdt->timeout =3D 0;\t\t/* =3D=3D disabled */\n"
+ "+\twdt->timeout = 0;\t\t/* == disabled */\n"
  " #endif\n"
  " \tclear_bit(0, &is_active);\n"
  " \treturn 0;\n"
  " }\n"
- "=20\n"
- " static const struct file_operations mpc5200_wdt_fops =3D {\n"
- "-\t.owner\t=3D THIS_MODULE,\n"
- "-\t.write\t=3D mpc5200_wdt_write,\n"
- "+\t.owner\t\t=3D THIS_MODULE,\n"
- "+\t.llseek\t\t=3D no_llseek,\n"
- "+\t.write\t\t=3D mpc5200_wdt_write,\n"
- " \t.unlocked_ioctl\t=3D mpc5200_wdt_ioctl,\n"
- "-\t.open\t=3D mpc5200_wdt_open,\n"
- "-\t.release =3D mpc5200_wdt_release,\n"
- "+\t.open\t\t=3D mpc5200_wdt_open,\n"
- "+\t.release\t=3D mpc5200_wdt_release,\n"
+ " \n"
+ " static const struct file_operations mpc5200_wdt_fops = {\n"
+ "-\t.owner\t= THIS_MODULE,\n"
+ "-\t.write\t= mpc5200_wdt_write,\n"
+ "+\t.owner\t\t= THIS_MODULE,\n"
+ "+\t.llseek\t\t= no_llseek,\n"
+ "+\t.write\t\t= mpc5200_wdt_write,\n"
+ " \t.unlocked_ioctl\t= mpc5200_wdt_ioctl,\n"
+ "-\t.open\t= mpc5200_wdt_open,\n"
+ "-\t.release = mpc5200_wdt_release,\n"
+ "+\t.open\t\t= mpc5200_wdt_open,\n"
+ "+\t.release\t= mpc5200_wdt_release,\n"
  "+};\n"
  "+\n"
- "+static struct miscdevice mpc5200_wdt_miscdev =3D {\n"
- "+\t.minor\t\t=3D WATCHDOG_MINOR,\n"
- "+\t.name\t\t=3D \"watchdog\",\n"
- "+\t.fops\t\t=3D &mpc5200_wdt_fops,\n"
+ "+static struct miscdevice mpc5200_wdt_miscdev = {\n"
+ "+\t.minor\t\t= WATCHDOG_MINOR,\n"
+ "+\t.name\t\t= \"watchdog\",\n"
+ "+\t.fops\t\t= &mpc5200_wdt_fops,\n"
  " };\n"
- "=20\n"
+ " \n"
  " /* module operations */\n"
  "-static int mpc5200_wdt_probe(struct of_device *op,\n"
  "-\t\t\t\t\tconst struct of_device_id *match)\n"
@@ -237,54 +232,54 @@
  "-\tconst void *has_wdt;\n"
  "-\tint size;\n"
  "+\tstruct mpc52xx_gpt_priv *timer;\n"
- "=20\n"
- "-\thas_wdt =3D of_get_property(op->node, \"has-wdt\", NULL);\n"
+ " \n"
+ "-\thas_wdt = of_get_property(op->node, \"has-wdt\", NULL);\n"
  "-\tif (!has_wdt)\n"
- "-\t\thas_wdt =3D of_get_property(op->node, \"fsl,has-wdt\", NULL);\n"
+ "-\t\thas_wdt = of_get_property(op->node, \"fsl,has-wdt\", NULL);\n"
  "-\tif (!has_wdt)\n"
  "+\t/* grab the watchdog-capable gpt */\n"
- "+\ttimer =3D mpc52xx_gpt_wdt_probe();\n"
+ "+\ttimer = mpc52xx_gpt_wdt_probe();\n"
  "+\tif (!timer) {\n"
  "+\t\tpr_err(WDT_IDENTITY \": probing failed\\n\");\n"
  " \t\treturn -ENODEV;\n"
  "+\t}\n"
- "=20\n"
- "-\twdt =3D kzalloc(sizeof(*wdt), GFP_KERNEL);\n"
+ " \n"
+ "-\twdt = kzalloc(sizeof(*wdt), GFP_KERNEL);\n"
  "-\tif (!wdt)\n"
- "+\twdt_global =3D kzalloc(sizeof(struct mpc5200_wdt), GFP_KERNEL);\n"
+ "+\twdt_global = kzalloc(sizeof(struct mpc5200_wdt), GFP_KERNEL);\n"
  "+\tif (!wdt_global) {\n"
  "+\t\tmpc52xx_gpt_wdt_release(timer);\n"
  " \t\treturn -ENOMEM;\n"
  "-\n"
- "-\twdt->ipb_freq =3D mpc5xxx_get_bus_frequency(op->node);\n"
+ "-\twdt->ipb_freq = mpc5xxx_get_bus_frequency(op->node);\n"
  "-\n"
- "-\terr =3D of_address_to_resource(op->node, 0, &wdt->mem);\n"
+ "-\terr = of_address_to_resource(op->node, 0, &wdt->mem);\n"
  "-\tif (err)\n"
  "-\t\tgoto out_free;\n"
- "-\tsize =3D wdt->mem.end - wdt->mem.start + 1;\n"
+ "-\tsize = wdt->mem.end - wdt->mem.start + 1;\n"
  "-\tif (!request_mem_region(wdt->mem.start, size, \"mpc5200_wdt\")) {\n"
- "-\t\terr =3D -ENODEV;\n"
+ "-\t\terr = -ENODEV;\n"
  "-\t\tgoto out_free;\n"
  "-\t}\n"
- "-\twdt->regs =3D ioremap(wdt->mem.start, size);\n"
+ "-\twdt->regs = ioremap(wdt->mem.start, size);\n"
  "-\tif (!wdt->regs) {\n"
- "-\t\terr =3D -ENODEV;\n"
+ "-\t\terr = -ENODEV;\n"
  "-\t\tgoto out_release;\n"
  " \t}\n"
  "-\n"
  "-\tdev_set_drvdata(&op->dev, wdt);\n"
  "-\tspin_lock_init(&wdt->io_lock);\n"
  "-\n"
- "-\twdt->miscdev =3D (struct miscdevice) {\n"
- "-\t\t.minor\t=3D WATCHDOG_MINOR,\n"
- "-\t\t.name\t=3D \"watchdog\",\n"
- "-\t\t.fops\t=3D &mpc5200_wdt_fops,\n"
- "-\t\t.parent =3D &op->dev,\n"
+ "-\twdt->miscdev = (struct miscdevice) {\n"
+ "-\t\t.minor\t= WATCHDOG_MINOR,\n"
+ "-\t\t.name\t= \"watchdog\",\n"
+ "-\t\t.fops\t= &mpc5200_wdt_fops,\n"
+ "-\t\t.parent = &op->dev,\n"
  "-\t};\n"
- "-\twdt_global =3D wdt;\n"
- "-\terr =3D misc_register(&wdt->miscdev);\n"
- "+\twdt_global->timer =3D timer;\n"
- "+\terr =3D misc_register(&mpc5200_wdt_miscdev);\n"
+ "-\twdt_global = wdt;\n"
+ "-\terr = misc_register(&wdt->miscdev);\n"
+ "+\twdt_global->timer = timer;\n"
+ "+\terr = misc_register(&mpc5200_wdt_miscdev);\n"
  " \tif (!err)\n"
  "-\t\treturn 0;\n"
  "-\n"
@@ -300,10 +295,10 @@
  "+\t}\n"
  " \treturn err;\n"
  " }\n"
- "=20\n"
+ " \n"
  "-static int mpc5200_wdt_remove(struct of_device *op)\n"
  "-{\n"
- "-\tstruct mpc5200_wdt *wdt =3D dev_get_drvdata(&op->dev);\n"
+ "-\tstruct mpc5200_wdt *wdt = dev_get_drvdata(&op->dev);\n"
  "-\n"
  "-\tmpc5200_wdt_stop(wdt);\n"
  "-\tmisc_deregister(&wdt->miscdev);\n"
@@ -315,38 +310,38 @@
  "-}\n"
  "-static int mpc5200_wdt_suspend(struct of_device *op, pm_message_t state)\n"
  "-{\n"
- "-\tstruct mpc5200_wdt *wdt =3D dev_get_drvdata(&op->dev);\n"
+ "-\tstruct mpc5200_wdt *wdt = dev_get_drvdata(&op->dev);\n"
  "-\tmpc5200_wdt_stop(wdt);\n"
  "-\treturn 0;\n"
  "-}\n"
  "-static int mpc5200_wdt_resume(struct of_device *op)\n"
  "-{\n"
- "-\tstruct mpc5200_wdt *wdt =3D dev_get_drvdata(&op->dev);\n"
+ "-\tstruct mpc5200_wdt *wdt = dev_get_drvdata(&op->dev);\n"
  "-\tif (wdt->count)\n"
  "-\t\tmpc5200_wdt_start(wdt);\n"
  "-\treturn 0;\n"
  "-}\n"
  "-static int mpc5200_wdt_shutdown(struct of_device *op)\n"
  "-{\n"
- "-\tstruct mpc5200_wdt *wdt =3D dev_get_drvdata(&op->dev);\n"
+ "-\tstruct mpc5200_wdt *wdt = dev_get_drvdata(&op->dev);\n"
  "-\tmpc5200_wdt_stop(wdt);\n"
  "-\treturn 0;\n"
  "-}\n"
  "-\n"
- "-static struct of_device_id mpc5200_wdt_match[] =3D {\n"
- "-\t{ .compatible =3D \"mpc5200-gpt\", },\n"
- "-\t{ .compatible =3D \"fsl,mpc5200-gpt\", },\n"
+ "-static struct of_device_id mpc5200_wdt_match[] = {\n"
+ "-\t{ .compatible = \"mpc5200-gpt\", },\n"
+ "-\t{ .compatible = \"fsl,mpc5200-gpt\", },\n"
  "-\t{},\n"
  "-};\n"
- "-static struct of_platform_driver mpc5200_wdt_driver =3D {\n"
- "-\t.owner\t\t=3D THIS_MODULE,\n"
- "-\t.name\t\t=3D \"mpc5200-gpt-wdt\",\n"
- "-\t.match_table\t=3D mpc5200_wdt_match,\n"
- "-\t.probe\t\t=3D mpc5200_wdt_probe,\n"
- "-\t.remove\t\t=3D mpc5200_wdt_remove,\n"
- "-\t.suspend\t=3D mpc5200_wdt_suspend,\n"
- "-\t.resume\t\t=3D mpc5200_wdt_resume,\n"
- "-\t.shutdown\t=3D mpc5200_wdt_shutdown,\n"
+ "-static struct of_platform_driver mpc5200_wdt_driver = {\n"
+ "-\t.owner\t\t= THIS_MODULE,\n"
+ "-\t.name\t\t= \"mpc5200-gpt-wdt\",\n"
+ "-\t.match_table\t= mpc5200_wdt_match,\n"
+ "-\t.probe\t\t= mpc5200_wdt_probe,\n"
+ "-\t.remove\t\t= mpc5200_wdt_remove,\n"
+ "-\t.suspend\t= mpc5200_wdt_suspend,\n"
+ "-\t.resume\t\t= mpc5200_wdt_resume,\n"
+ "-\t.shutdown\t= mpc5200_wdt_shutdown,\n"
  "-};\n"
  "-\n"
  "-\n"
@@ -362,14 +357,14 @@
  "+\tmisc_deregister(&mpc5200_wdt_miscdev);\n"
  "+\tkfree(wdt_global);\n"
  " }\n"
- "=20\n"
+ " \n"
  " module_init(mpc5200_wdt_init);\n"
  " module_exit(mpc5200_wdt_exit);\n"
- "=20\n"
+ " \n"
  "-MODULE_AUTHOR(\"Domen Puncer <domen.puncer@telargo.com>\");\n"
  "+MODULE_AUTHOR(\"Domen Puncer <domen.puncer@telargo.com>, \"\n"
- "+\t      \"Albrecht Dre=DF <albrecht.dress@arcor.de>\");\n"
+ "+\t      \"Albrecht Dre\303\237 <albrecht.dress@arcor.de>\");\n"
  " MODULE_LICENSE(\"Dual BSD/GPL\");\n"
   MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
 
-48b597f239de0dc2db1ea2b15f4507986d6654d839313677ca8a5575fa973404
+199ec7ea4641a3755e3208ea6be02ed1dfda765af4fb65c0a54f9afbd29a959f

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.