Commit 082afb77 authored by Federico Vaga's avatar Federico Vaga

Merge branch 'bugfix/spi-load-null-ptr' into develop

parents c61322a8 17878c61
......@@ -14,3 +14,5 @@ Module.symvers
GPATH
GRTAGS
GTAGS
.clangd
compile_commands.json
\ No newline at end of file
......@@ -383,11 +383,11 @@ static inline size_t __fpga_mfd_devs_size(void)
static int svec_fpga_devices_init(struct svec_fpga *svec_fpga)
{
struct vme_dev *vdev = to_vme_dev(svec_fpga->dev.parent->parent);
struct svec_dev *svec_dev = dev_get_drvdata(&vdev->dev);
struct mfd_cell *fpga_mfd_devs;
struct irq_domain *vic_domain;
unsigned int n_mfd = 0;
int err;
struct svec_dev *svec_dev = dev_get_drvdata(svec_fpga->dev.parent);
fpga_mfd_devs = devm_kzalloc(&svec_fpga->dev,
__fpga_mfd_devs_size(),
......@@ -970,7 +970,6 @@ int svec_fpga_exit(struct svec_dev *svec_dev)
return 0;
/* this function must run before re-flashing */
BUG_ON(svec_dev->flags & SVEC_DEV_FLAGS_REPROGRAMMED);
svec_fpga_app_exit(svec_fpga);
svec_fmc_exit(svec_fpga);
svec_fpga_devices_exit(svec_fpga);
......
......@@ -95,10 +95,6 @@ static ssize_t svec_dbg_fw_write(struct file *file,
if (err)
return -EFAULT;
spin_lock(&svec_dev->lock);
svec_dev->flags |= SVEC_DEV_FLAGS_REPROGRAMMED;
spin_unlock(&svec_dev->lock);
err = svec_fw_load(svec_dev, buf_l);
if (err)
dev_err(&svec_dev->dev,
......@@ -638,14 +634,6 @@ static int svec_remove(struct device *dev, unsigned int ndev)
fpga_mgr_unregister(svec->mgr);
fpga_mgr_free(svec->mgr);
svec_vme_exit(svec);
if ((svec->flags & SVEC_DEV_FLAGS_REPROGRAMMED) == 0) {
/*
* If FPGA is REPROGRAMMED then there is
* no device to disable
*/
vme_disable_device(to_vme_dev(svec->dev.parent));
}
device_unregister(&svec->dev);
kfree(svec);
......
......@@ -106,7 +106,6 @@ static inline struct svec_fpga *to_svec_fpga(struct device *_dev)
}
#define SVEC_DEV_FLAGS_REPROGRAMMED BIT(0)
/**
* struct svec_dev - SVEC instance
* It describes a SVEC device instance.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment