From f23eb0ea9a7862263df338896b3ef415ca83ff51 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Fri, 17 May 2013 15:21:29 +0530 Subject: usb: host: uhci-platform: Remove redundant platform_set_drvdata() Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat Cc: Tony Prisk Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/uhci-platform.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/usb/host/uhci-platform.c') diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platform.c index 8c4dace4b14a..55cc1166a9ff 100644 --- a/drivers/usb/host/uhci-platform.c +++ b/drivers/usb/host/uhci-platform.c @@ -130,7 +130,6 @@ static int uhci_hcd_platform_remove(struct platform_device *pdev) iounmap(hcd->regs); release_mem_region(hcd->rsrc_start, hcd->rsrc_len); usb_put_hcd(hcd); - platform_set_drvdata(pdev, NULL); return 0; } -- cgit v1.2.3 From 5d689168c1224faf52867458452ecf15885d00cf Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Tue, 21 May 2013 17:17:21 +0530 Subject: usb: host: uhci-platform: Remove redundant use of of_match_ptr 'platform_uhci_ids' is always compiled in. Hence use of of_match_ptr is unnecessary. Signed-off-by: Sachin Kamat Cc: Tony Prisk Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/uhci-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb/host/uhci-platform.c') diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platform.c index 55cc1166a9ff..5382f3a8670d 100644 --- a/drivers/usb/host/uhci-platform.c +++ b/drivers/usb/host/uhci-platform.c @@ -160,6 +160,6 @@ static struct platform_driver uhci_platform_driver = { .driver = { .name = "platform-uhci", .owner = THIS_MODULE, - .of_match_table = of_match_ptr(platform_uhci_ids), + .of_match_table = platform_uhci_ids, }, }; -- cgit v1.2.3 From 477527baf6a8d4c8652f979f0aa3546216635184 Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Thu, 23 May 2013 19:18:39 +0900 Subject: USB: host: use platform_{get,set}_drvdata() Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Also, unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Jingoo Han Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/uhci-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb/host/uhci-platform.c') diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platform.c index e11b70ae5f6f..d033a0ec7f0d 100644 --- a/drivers/usb/host/uhci-platform.c +++ b/drivers/usb/host/uhci-platform.c @@ -143,7 +143,7 @@ static int uhci_hcd_platform_remove(struct platform_device *pdev) */ static void uhci_hcd_platform_shutdown(struct platform_device *op) { - struct usb_hcd *hcd = dev_get_drvdata(&op->dev); + struct usb_hcd *hcd = platform_get_drvdata(op); uhci_hc_died(hcd_to_uhci(hcd)); } -- cgit v1.2.3