diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-05 19:20:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-05 19:20:22 -0400 |
commit | abf7dba7c4f77d781f6df50fefb19a64c5dc331f (patch) | |
tree | 38648731b502d5aec508f3b33f6616190e598eb6 /drivers/fpga/xilinx-pr-decoupler.c | |
parent | 07c4dd3435aa387d3b58f4e941dc516513f14507 (diff) | |
parent | b23220fe054e92f616b82450fae8cd3ab176cc60 (diff) |
Merge tag 'char-misc-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH:
"Here is the "big" char and misc driver patches for 4.18-rc1.
It's not a lot of stuff here, but there are some highlights:
- coreboot driver updates
- soundwire driver updates
- android binder updates
- fpga big sync, mostly documentation
- lots of minor driver updates
All of these have been in linux-next for a while with no reported
issues"
* tag 'char-misc-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (81 commits)
vmw_balloon: fixing double free when batching mode is off
MAINTAINERS: Add driver-api/fpga path
fpga: clarify that unregister functions also free
documentation: fpga: move fpga-region.txt to driver-api
documentation: fpga: add bridge document to driver-api
documentation: fpga: move fpga-mgr.txt to driver-api
Documentation: fpga: move fpga overview to driver-api
fpga: region: kernel-doc fixes
fpga: bridge: kernel-doc fixes
fpga: mgr: kernel-doc fixes
fpga: use SPDX
fpga: region: change api, add fpga_region_create/free
fpga: bridge: change api, don't use drvdata
fpga: manager: change api, don't use drvdata
fpga: region: don't use drvdata in common fpga code
Drivers: hv: vmbus: Removed an unnecessary cast from void *
ver_linux: Drop redundant calls to system() to test if file is readable
ver_linux: Move stderr redirection from function parameter to function body
misc: IBM Virtual Management Channel Driver (VMC)
rpmsg: Correct support for MODULE_DEVICE_TABLE()
...
Diffstat (limited to 'drivers/fpga/xilinx-pr-decoupler.c')
-rw-r--r-- | drivers/fpga/xilinx-pr-decoupler.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/fpga/xilinx-pr-decoupler.c b/drivers/fpga/xilinx-pr-decoupler.c index 0d7743089414..07ba1539e82c 100644 --- a/drivers/fpga/xilinx-pr-decoupler.c +++ b/drivers/fpga/xilinx-pr-decoupler.c | |||
@@ -94,6 +94,7 @@ MODULE_DEVICE_TABLE(of, xlnx_pr_decoupler_of_match); | |||
94 | static int xlnx_pr_decoupler_probe(struct platform_device *pdev) | 94 | static int xlnx_pr_decoupler_probe(struct platform_device *pdev) |
95 | { | 95 | { |
96 | struct xlnx_pr_decoupler_data *priv; | 96 | struct xlnx_pr_decoupler_data *priv; |
97 | struct fpga_bridge *br; | ||
97 | int err; | 98 | int err; |
98 | struct resource *res; | 99 | struct resource *res; |
99 | 100 | ||
@@ -120,16 +121,27 @@ static int xlnx_pr_decoupler_probe(struct platform_device *pdev) | |||
120 | 121 | ||
121 | clk_disable(priv->clk); | 122 | clk_disable(priv->clk); |
122 | 123 | ||
123 | err = fpga_bridge_register(&pdev->dev, "Xilinx PR Decoupler", | 124 | br = fpga_bridge_create(&pdev->dev, "Xilinx PR Decoupler", |
124 | &xlnx_pr_decoupler_br_ops, priv); | 125 | &xlnx_pr_decoupler_br_ops, priv); |
126 | if (!br) { | ||
127 | err = -ENOMEM; | ||
128 | goto err_clk; | ||
129 | } | ||
130 | |||
131 | platform_set_drvdata(pdev, br); | ||
125 | 132 | ||
133 | err = fpga_bridge_register(br); | ||
126 | if (err) { | 134 | if (err) { |
127 | dev_err(&pdev->dev, "unable to register Xilinx PR Decoupler"); | 135 | dev_err(&pdev->dev, "unable to register Xilinx PR Decoupler"); |
128 | clk_unprepare(priv->clk); | 136 | goto err_clk; |
129 | return err; | ||
130 | } | 137 | } |
131 | 138 | ||
132 | return 0; | 139 | return 0; |
140 | |||
141 | err_clk: | ||
142 | clk_unprepare(priv->clk); | ||
143 | |||
144 | return err; | ||
133 | } | 145 | } |
134 | 146 | ||
135 | static int xlnx_pr_decoupler_remove(struct platform_device *pdev) | 147 | static int xlnx_pr_decoupler_remove(struct platform_device *pdev) |
@@ -137,7 +149,7 @@ static int xlnx_pr_decoupler_remove(struct platform_device *pdev) | |||
137 | struct fpga_bridge *bridge = platform_get_drvdata(pdev); | 149 | struct fpga_bridge *bridge = platform_get_drvdata(pdev); |
138 | struct xlnx_pr_decoupler_data *p = bridge->priv; | 150 | struct xlnx_pr_decoupler_data *p = bridge->priv; |
139 | 151 | ||
140 | fpga_bridge_unregister(&pdev->dev); | 152 | fpga_bridge_unregister(bridge); |
141 | 153 | ||
142 | clk_unprepare(p->clk); | 154 | clk_unprepare(p->clk); |
143 | 155 | ||