pnwotg_test: send usb warning when test device is not supported
authorWu, Hao <hao.wu@intel.com>
Thu, 17 May 2012 07:27:05 +0000 (15:27 +0800)
committerbuildbot <buildbot@intel.com>
Tue, 22 May 2012 10:23:00 +0000 (03:23 -0700)
BZ: 30607

Notify usb warning when test device is not supported by pnwotg_test
driver.

Change-Id: Idafbea1cb2d2668b929bc63ee5351a88bd95a6f0
Signed-off-by: Wu, Hao <hao.wu@intel.com>
Reviewed-on: http://android.intel.com:8080/49178
Reviewed-by: Zhuang, Jin Can <jin.can.zhuang@intel.com>
Reviewed-by: Tang, Richard <richard.tang@intel.com>
Reviewed-by: Tang, Jianqiang <jianqiang.tang@intel.com>
Reviewed-by: Meng, Zhe <zhe.meng@intel.com>
Tested-by: Meng, Zhe <zhe.meng@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/usb/otg/penwell_otg_test.c

index c98ba5a..eb7748f 100644 (file)
@@ -31,6 +31,8 @@
 #include <linux/usb.h>
 #include <linux/usb/hcd.h>
 
+#include <../core/usb.h>
+
 struct pnwotg_test_dev {
        struct usb_device       *udev;
        struct usb_hcd          *hcd;
@@ -129,6 +131,7 @@ pnwotg_test_probe(struct usb_interface *intf, const struct usb_device_id *id)
        default:
                dev_info(&intf->dev, "unknown test mode with PID 0x%04x",
                        id->idProduct);
+               usb_notify_warning(dev->udev, -EINVAL);
        }
 
        return 0;