emmc_ipanic: Do not warn about harmless notifications
authorDavid Weinehall <david.weinehall@intel.com>
Fri, 27 Apr 2012 06:36:36 +0000 (09:36 +0300)
committerbuildbot <buildbot@intel.com>
Fri, 4 May 2012 12:44:53 +0000 (05:44 -0700)
BZ: 23560

The notification handler currently prints error messages of
severity KERN_EMERG for any unknown notifications.  There are currently
two perfectly valid notifications that we don't need to process,
so ignore these explicitly, and lower the severity to KERN_ERR for the
notifications that we don't known about currently.  Since the driver
does not break from receiving unknown notifications this is not
an emergency.

Change-Id: If6dc43ae551925d26cdfce1180c8adb8fc24d80d
Signed-off-by: David Weinehall <david.weinehall@intel.com>
Reviewed-on: http://android.intel.com:8080/46558
Reviewed-by: Koskinen, Ilkka <ilkka.koskinen@intel.com>
Reviewed-by: Guerard, Christophe <christophe.guerard@intel.com>
Tested-by: Zhang, Dongxing <dongxing.zhang@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/misc/emmc_ipanic.c

index 01c2bc2..8019fe2 100755 (executable)
@@ -926,8 +926,16 @@ static int emmc_panic_partition_notify(struct notifier_block *nb,
                /*notify to add the panic device */
                emmc_panic_notify_remove();
                break;
+       case BUS_NOTIFY_BIND_DRIVER:
+       case BUS_NOTIFY_UNBOUND_DRIVER:
+               /* Nothing to do here, but we don't want
+                * these actions to generate error messages,
+                * so we need to catch them
+                */
+               break;
        default:
-               printk(KERN_EMERG "Incorrect action on %s\n", dev_name(dev));
+               printk(KERN_ERR "Unknown action (%lu) on %s\n",
+                      action, dev_name(dev));
                return 0;
        }
        return 1;