1 From 915f1d230e5292bc2156a9997bcb19d9e632f10b Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Wed, 16 Dec 2020 15:33:05 +0100
4 Subject: [PATCH] phy: phy-brcm-usb: specify init function format at struct
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 This is slightly cleaner solution that assures noone assings a wrong
11 function to the pointer.
13 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
14 Acked-by: Florian Fainelli <f.fainelli@gmail.com>
15 Link: https://lore.kernel.org/r/20201216143305.12179-2-zajec5@gmail.com
16 Signed-off-by: Vinod Koul <vkoul@kernel.org>
18 drivers/phy/broadcom/phy-brcm-usb.c | 7 +++----
19 1 file changed, 3 insertions(+), 4 deletions(-)
21 --- a/drivers/phy/broadcom/phy-brcm-usb.c
22 +++ b/drivers/phy/broadcom/phy-brcm-usb.c
23 @@ -36,7 +36,7 @@ struct value_to_name_map {
26 struct match_chip_info {
28 + void (*init_func)(struct brcm_usb_init_params *params);
29 u8 required_regs[BRCM_REGS_MAX + 1];
32 @@ -458,7 +458,6 @@ static int brcm_usb_phy_probe(struct pla
33 struct device_node *dn = pdev->dev.of_node;
36 - void (*dvr_init)(struct brcm_usb_init_params *params);
37 const struct match_chip_info *info;
40 @@ -474,8 +473,8 @@ static int brcm_usb_phy_probe(struct pla
41 info = of_device_get_match_data(&pdev->dev);
44 - dvr_init = info->init_func;
45 - (*dvr_init)(&priv->ini);
47 + info->init_func(&priv->ini);
49 dev_dbg(dev, "Best mapping table is for %s\n",
50 priv->ini.family_name);