Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: sep: update initialisation

In particular we want to always do the reconfigure

[This is picked out of the differences between the upstream driver and
the staging driver. I'm resolving the differences as a series of updates -AC]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Mark A. Allyn and committed by
Greg Kroah-Hartman
ecd0cb00 6ab80c26

+14 -14
+14 -14
drivers/staging/sep/sep_main.c
··· 4150 4150 4151 4151 dev_dbg(&sep->pdev->dev, "sep probe: PCI obtained, " 4152 4152 "device being prepared\n"); 4153 - dev_dbg(&sep->pdev->dev, "revision is %d\n", sep->pdev->revision); 4154 4153 4155 4154 /* Set up our register area */ 4156 4155 sep->reg_physical_addr = pci_resource_start(sep->pdev, 0); ··· 4212 4213 goto end_function_deallocate_sep_shared_area; 4213 4214 4214 4215 /* The new chip requires a shared area reconfigure */ 4215 - if (sep->pdev->revision != 0) { /* Only for new chip */ 4216 - error = sep_reconfig_shared_area(sep); 4217 - if (error) 4218 - goto end_function_free_irq; 4219 - } 4216 + error = sep_reconfig_shared_area(sep); 4217 + if (error) 4218 + goto end_function_free_irq; 4220 4219 4221 4220 sep->in_use = 1; 4222 4221 4223 4222 /* Finally magic up the device nodes */ 4224 4223 /* Register driver with the fs */ 4225 4224 error = sep_register_driver_with_fs(sep); 4226 - if (error) 4227 - goto end_function_free_irq; 4228 4225 4226 + if (error) { 4227 + dev_err(&sep->pdev->dev, "error registering dev file\n"); 4228 + goto end_function_free_irq; 4229 + } 4230 + 4231 + sep->in_use = 0; /* through touching the device */ 4229 4232 #ifdef SEP_ENABLE_RUNTIME_PM 4230 4233 pm_runtime_put_noidle(&sep->pdev->dev); 4231 4234 pm_runtime_allow(&sep->pdev->dev); 4232 4235 pm_runtime_set_autosuspend_delay(&sep->pdev->dev, 4233 4236 SUSPEND_DELAY); 4234 4237 pm_runtime_use_autosuspend(&sep->pdev->dev); 4238 + pm_runtime_mark_last_busy(&sep->pdev->dev); 4235 4239 sep->power_save_setup = 1; 4236 4240 #endif 4237 - 4238 - sep->in_use = 0; 4239 - 4240 4241 /* register kernel crypto driver */ 4242 + #if defined(CONFIG_CRYPTO) 4241 4243 error = sep_crypto_setup(); 4242 4244 if (error) { 4243 - dev_dbg(&sep->pdev->dev, "crypto setup fail\n"); 4245 + dev_err(&sep->pdev->dev, "crypto setup failed\n"); 4244 4246 goto end_function_free_irq; 4245 4247 } 4246 - 4248 + #endif 4247 4249 goto end_function; 4248 4250 4249 4251 end_function_free_irq: ··· 4292 4292 4293 4293 /* Free the shared area */ 4294 4294 sep_unmap_and_free_shared_area(sep_dev); 4295 - iounmap((void __iomem *)sep_dev->reg_addr); 4295 + iounmap(sep_dev->reg_addr); 4296 4296 4297 4297 #ifdef SEP_ENABLE_RUNTIME_PM 4298 4298 if (sep->in_use) {