diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2018-02-12 15:45:40 +1030 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-14 19:11:00 +0100 |
commit | 15362d69c4c88a8f1762b319281c976d293cfe47 (patch) | |
tree | 6d379358106b5e363b1cc1119d1b3920ec5ce6a9 /drivers/fsi/fsi-core.c | |
parent | 57adbeea6451cedfeda257fe77749512894dff29 (diff) | |
download | linux-15362d69c4c88a8f1762b319281c976d293cfe47.tar.bz2 |
fsi: Add fsi_master_rescan()
We'll want non-core fsi code to trigger a rescan, so introduce a
non-static fsi_master_rescan() function. Use this for the existing
unscan/scan behaviour too.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Christopher Bostic <clbostic@linux.vnet.ibm.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/fsi/fsi-core.c')
-rw-r--r-- | drivers/fsi/fsi-core.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c index e318bf8c623c..6e5aa9b26665 100644 --- a/drivers/fsi/fsi-core.c +++ b/drivers/fsi/fsi-core.c @@ -762,14 +762,20 @@ static void fsi_master_unscan(struct fsi_master *master) device_for_each_child(&master->dev, NULL, fsi_master_remove_slave); } +int fsi_master_rescan(struct fsi_master *master) +{ + fsi_master_unscan(master); + return fsi_master_scan(master); +} +EXPORT_SYMBOL_GPL(fsi_master_rescan); + static ssize_t master_rescan_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct fsi_master *master = to_fsi_master(dev); int rc; - fsi_master_unscan(master); - rc = fsi_master_scan(master); + rc = fsi_master_rescan(master); if (rc < 0) return rc; |