Yanjiang Jin 27bda205ba EDAC, mpc85xx: Implement remove method for the platform driver
If we execute the below steps without this patch:

  modprobe mpc85xx_edac [The first insmod, everything is well.]
  modprobe -r mpc85xx_edac
  modprobe mpc85xx_edac [insmod again, error happens.]

We would get the error messages as below:

  BUG: recent printk recursion!
  Oops: Kernel access of bad area, sig: 11 [#48]
  Modules linked in: mpc85xx_edac edac_core softdog [last unloaded: mpc85xx_edac]
  CPU: 5 PID: 14773 Comm: modprobe Tainted: G D C 4.8.3-rt2
   .vsnprintf
   .vscnprintf
   .vprintk_emit
   .printk
   .edac_pci_add_device
   .mpc85xx_pci_err_probe
   .platform_drv_probe
   .driver_probe_device
   .__driver_attach
   .bus_for_each_dev
   .driver_attach
   .bus_add_driver
   .driver_register
   .__platform_register_drivers
   .mpc85xx_mc_init
   .do_one_initcall
   .do_init_module
   .load_module
   .SyS_finit_module
   system_call

Address this by cleaning up properly when removing the platform driver.

Tested on a T4240QDS board.

Signed-off-by: Yanjiang Jin <yanjiang.jin@windriver.com>
Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: york.sun@nxp.com
Link: http://lkml.kernel.org/r/1479351380-17109-2-git-send-email-yanjiang.jin@windriver.com
[ Boris: massage commit message. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
2016-11-17 11:19:50 +01:00
..
2016-10-14 12:50:05 -07:00
2016-10-11 15:06:33 -07:00
2016-10-07 21:23:40 -07:00
2016-10-07 21:34:49 -07:00
2016-10-06 17:13:54 -07:00
2016-10-07 21:23:40 -07:00
2016-10-04 10:56:14 -07:00
2016-10-05 14:50:51 -07:00
2016-10-14 13:43:08 -07:00
2016-10-11 12:52:41 -07:00
2016-09-27 12:33:47 +02:00
2016-10-11 15:06:33 -07:00
2016-10-14 15:17:12 -07:00
2016-10-07 21:23:40 -07:00
2016-10-07 08:35:35 -07:00
2016-10-03 20:17:35 -07:00
2016-10-14 13:43:08 -07:00
2016-10-07 21:23:40 -07:00
2016-10-07 21:23:40 -07:00
2016-10-07 21:23:40 -07:00
2016-10-13 16:52:39 -07:00
2016-10-06 17:03:49 -07:00
2016-10-14 13:13:44 -07:00
2016-10-07 09:28:53 -07:00
2016-10-14 11:37:50 -07:00
2016-10-14 11:07:42 -07:00
2016-10-11 15:06:33 -07:00
2016-10-11 15:06:33 -07:00
2016-09-29 13:36:38 -06:00
2016-10-06 11:19:10 -07:00