aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/dfl.c
diff options
context:
space:
mode:
authorWu Hao <[email protected]>2019-08-04 10:20:18 +0000
committerGreg Kroah-Hartman <[email protected]>2019-08-05 16:02:18 +0000
commit3c51ff772278d291117dae9cad09ddef07e0d504 (patch)
tree614e5107f11e371c7b466e8beab92cfd9625f36c /drivers/fpga/dfl.c
parentfpga: dfl: add id_table for dfl private feature driver (diff)
downloadkernel-3c51ff772278d291117dae9cad09ddef07e0d504.tar.gz
kernel-3c51ff772278d291117dae9cad09ddef07e0d504.zip
fpga: dfl: make uinit callback optional
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/fpga/dfl.c')
-rw-r--r--drivers/fpga/dfl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/fpga/dfl.c b/drivers/fpga/dfl.c
index 87eaef6d2723..c0512afc4ed7 100644
--- 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;
}
}