diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-05 19:20:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-05 19:20:22 -0400 |
commit | abf7dba7c4f77d781f6df50fefb19a64c5dc331f (patch) | |
tree | 38648731b502d5aec508f3b33f6616190e598eb6 /drivers/fpga/altera-cvp.c | |
parent | 07c4dd3435aa387d3b58f4e941dc516513f14507 (diff) | |
parent | b23220fe054e92f616b82450fae8cd3ab176cc60 (diff) |
Merge tag 'char-misc-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH:
"Here is the "big" char and misc driver patches for 4.18-rc1.
It's not a lot of stuff here, but there are some highlights:
- coreboot driver updates
- soundwire driver updates
- android binder updates
- fpga big sync, mostly documentation
- lots of minor driver updates
All of these have been in linux-next for a while with no reported
issues"
* tag 'char-misc-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (81 commits)
vmw_balloon: fixing double free when batching mode is off
MAINTAINERS: Add driver-api/fpga path
fpga: clarify that unregister functions also free
documentation: fpga: move fpga-region.txt to driver-api
documentation: fpga: add bridge document to driver-api
documentation: fpga: move fpga-mgr.txt to driver-api
Documentation: fpga: move fpga overview to driver-api
fpga: region: kernel-doc fixes
fpga: bridge: kernel-doc fixes
fpga: mgr: kernel-doc fixes
fpga: use SPDX
fpga: region: change api, add fpga_region_create/free
fpga: bridge: change api, don't use drvdata
fpga: manager: change api, don't use drvdata
fpga: region: don't use drvdata in common fpga code
Drivers: hv: vmbus: Removed an unnecessary cast from void *
ver_linux: Drop redundant calls to system() to test if file is readable
ver_linux: Move stderr redirection from function parameter to function body
misc: IBM Virtual Management Channel Driver (VMC)
rpmsg: Correct support for MODULE_DEVICE_TABLE()
...
Diffstat (limited to 'drivers/fpga/altera-cvp.c')
-rw-r--r-- | drivers/fpga/altera-cvp.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/fpga/altera-cvp.c b/drivers/fpga/altera-cvp.c index 77b04e4b3254..dd4edd8f22ce 100644 --- a/drivers/fpga/altera-cvp.c +++ b/drivers/fpga/altera-cvp.c | |||
@@ -401,6 +401,7 @@ static int altera_cvp_probe(struct pci_dev *pdev, | |||
401 | const struct pci_device_id *dev_id) | 401 | const struct pci_device_id *dev_id) |
402 | { | 402 | { |
403 | struct altera_cvp_conf *conf; | 403 | struct altera_cvp_conf *conf; |
404 | struct fpga_manager *mgr; | ||
404 | u16 cmd, val; | 405 | u16 cmd, val; |
405 | int ret; | 406 | int ret; |
406 | 407 | ||
@@ -452,16 +453,24 @@ static int altera_cvp_probe(struct pci_dev *pdev, | |||
452 | snprintf(conf->mgr_name, sizeof(conf->mgr_name), "%s @%s", | 453 | snprintf(conf->mgr_name, sizeof(conf->mgr_name), "%s @%s", |
453 | ALTERA_CVP_MGR_NAME, pci_name(pdev)); | 454 | ALTERA_CVP_MGR_NAME, pci_name(pdev)); |
454 | 455 | ||
455 | ret = fpga_mgr_register(&pdev->dev, conf->mgr_name, | 456 | mgr = fpga_mgr_create(&pdev->dev, conf->mgr_name, |
456 | &altera_cvp_ops, conf); | 457 | &altera_cvp_ops, conf); |
457 | if (ret) | 458 | if (!mgr) |
459 | return -ENOMEM; | ||
460 | |||
461 | pci_set_drvdata(pdev, mgr); | ||
462 | |||
463 | ret = fpga_mgr_register(mgr); | ||
464 | if (ret) { | ||
465 | fpga_mgr_free(mgr); | ||
458 | goto err_unmap; | 466 | goto err_unmap; |
467 | } | ||
459 | 468 | ||
460 | ret = driver_create_file(&altera_cvp_driver.driver, | 469 | ret = driver_create_file(&altera_cvp_driver.driver, |
461 | &driver_attr_chkcfg); | 470 | &driver_attr_chkcfg); |
462 | if (ret) { | 471 | if (ret) { |
463 | dev_err(&pdev->dev, "Can't create sysfs chkcfg file\n"); | 472 | dev_err(&pdev->dev, "Can't create sysfs chkcfg file\n"); |
464 | fpga_mgr_unregister(&pdev->dev); | 473 | fpga_mgr_unregister(mgr); |
465 | goto err_unmap; | 474 | goto err_unmap; |
466 | } | 475 | } |
467 | 476 | ||
@@ -483,7 +492,7 @@ static void altera_cvp_remove(struct pci_dev *pdev) | |||
483 | u16 cmd; | 492 | u16 cmd; |
484 | 493 | ||
485 | driver_remove_file(&altera_cvp_driver.driver, &driver_attr_chkcfg); | 494 | driver_remove_file(&altera_cvp_driver.driver, &driver_attr_chkcfg); |
486 | fpga_mgr_unregister(&pdev->dev); | 495 | fpga_mgr_unregister(mgr); |
487 | pci_iounmap(pdev, conf->map); | 496 | pci_iounmap(pdev, conf->map); |
488 | pci_release_region(pdev, CVP_BAR); | 497 | pci_release_region(pdev, CVP_BAR); |
489 | pci_read_config_word(pdev, PCI_COMMAND, &cmd); | 498 | pci_read_config_word(pdev, PCI_COMMAND, &cmd); |