Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: renesas_usbhs: move flags to param

Move options from 'flags' field in private structure to param structure
where other options are already being kept.

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Chris Brandt and committed by
Greg Kroah-Hartman
97a79684 b051c937

+8 -18
+7 -16
drivers/usb/renesas_usbhs/common.c
··· 43 43 * | .... | +-----------+ 44 44 */ 45 45 46 - 47 - #define USBHSF_RUNTIME_PWCTRL (1 << 0) 48 - 49 - /* status */ 50 - #define usbhsc_flags_init(p) do {(p)->flags = 0; } while (0) 51 - #define usbhsc_flags_set(p, b) ((p)->flags |= (b)) 52 - #define usbhsc_flags_clr(p, b) ((p)->flags &= ~(b)) 53 - #define usbhsc_flags_has(p, b) ((p)->flags & (b)) 54 - 55 46 /* 56 47 * platform call back 57 48 * ··· 470 479 dev_dbg(&pdev->dev, "%s enable\n", __func__); 471 480 472 481 /* power on */ 473 - if (usbhsc_flags_has(priv, USBHSF_RUNTIME_PWCTRL)) 482 + if (usbhs_get_dparam(priv, runtime_pwctrl)) 474 483 usbhsc_power_ctrl(priv, enable); 475 484 476 485 /* bus init */ ··· 490 499 usbhsc_bus_init(priv); 491 500 492 501 /* power off */ 493 - if (usbhsc_flags_has(priv, USBHSF_RUNTIME_PWCTRL)) 502 + if (usbhs_get_dparam(priv, runtime_pwctrl)) 494 503 usbhsc_power_ctrl(priv, enable); 495 504 496 505 usbhs_mod_change(priv, -1); ··· 724 733 /* FIXME */ 725 734 /* runtime power control ? */ 726 735 if (priv->pfunc.get_vbus) 727 - usbhsc_flags_set(priv, USBHSF_RUNTIME_PWCTRL); 736 + usbhs_get_dparam(priv, runtime_pwctrl) = 1; 728 737 729 738 /* 730 739 * priv settings ··· 798 807 799 808 /* power control */ 800 809 pm_runtime_enable(&pdev->dev); 801 - if (!usbhsc_flags_has(priv, USBHSF_RUNTIME_PWCTRL)) { 810 + if (!usbhs_get_dparam(priv, runtime_pwctrl)) { 802 811 usbhsc_power_ctrl(priv, 1); 803 812 usbhs_mod_autonomy_mode(priv); 804 813 } ··· 839 848 dfunc->notify_hotplug = NULL; 840 849 841 850 /* power off */ 842 - if (!usbhsc_flags_has(priv, USBHSF_RUNTIME_PWCTRL)) 851 + if (!usbhs_get_dparam(priv, runtime_pwctrl)) 843 852 usbhsc_power_ctrl(priv, 0); 844 853 845 854 pm_runtime_disable(&pdev->dev); ··· 864 873 usbhs_mod_change(priv, -1); 865 874 } 866 875 867 - if (mod || !usbhsc_flags_has(priv, USBHSF_RUNTIME_PWCTRL)) 876 + if (mod || !usbhs_get_dparam(priv, runtime_pwctrl)) 868 877 usbhsc_power_ctrl(priv, 0); 869 878 870 879 return 0; ··· 875 884 struct usbhs_priv *priv = dev_get_drvdata(dev); 876 885 struct platform_device *pdev = usbhs_priv_to_pdev(priv); 877 886 878 - if (!usbhsc_flags_has(priv, USBHSF_RUNTIME_PWCTRL)) { 887 + if (!usbhs_get_dparam(priv, runtime_pwctrl)) { 879 888 usbhsc_power_ctrl(priv, 1); 880 889 usbhs_mod_autonomy_mode(priv); 881 890 }
-2
drivers/usb/renesas_usbhs/common.h
··· 260 260 261 261 spinlock_t lock; 262 262 263 - u32 flags; 264 - 265 263 /* 266 264 * module control 267 265 */
+1
include/linux/usb/renesas_usbhs.h
··· 189 189 u32 has_otg:1; /* for controlling PWEN/EXTLP */ 190 190 u32 has_sudmac:1; /* for SUDMAC */ 191 191 u32 has_usb_dmac:1; /* for USB-DMAC */ 192 + u32 runtime_pwctrl:1; 192 193 #define USBHS_USB_DMAC_XFER_SIZE 32 /* hardcode the xfer size */ 193 194 }; 194 195