projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15bbb30
)
fpga: dfl: make uinit callback optional
author
Wu Hao
<hao.wu@intel.com>
Sun, 4 Aug 2019 10:20:18 +0000
(18:20 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 5 Aug 2019 16:02:18 +0000
(18:02 +0200)
This patch makes uinit callback of sub features optional. With
this change, people don't need to prepare any empty uinit callback.
Signed-off-by: Wu Hao <hao.wu@intel.com>
Link:
https://lore.kernel.org/r/1564914022-3710-9-git-send-email-hao.wu@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/fpga/dfl.c
patch
|
blob
|
history
diff --git
a/drivers/fpga/dfl.c
b/drivers/fpga/dfl.c
index 87eaef6d2723f61aa6edf846619ddd869931a45a..c0512afc4ed71025d64f7178068cdd7c767d0021 100644
(file)
--- a/
drivers/fpga/dfl.c
+++ b/
drivers/fpga/dfl.c
@@
-259,7
+259,8
@@
void dfl_fpga_dev_feature_uinit(struct platform_device *pdev)
dfl_fpga_dev_for_each_feature(pdata, feature)
if (feature->ops) {
- feature->ops->uinit(pdev, feature);
+ if (feature->ops->uinit)
+ feature->ops->uinit(pdev, feature);
feature->ops = NULL;
}
}