| OLD | NEW |
| 1 /* | 1 /* |
| 2 * firmware_class.c - Multi purpose firmware loading support | 2 * firmware_class.c - Multi purpose firmware loading support |
| 3 * | 3 * |
| 4 * Copyright (c) 2003 Manuel Estrada Sainz | 4 * Copyright (c) 2003 Manuel Estrada Sainz |
| 5 * | 5 * |
| 6 * Please see Documentation/firmware_class/ for more information. | 6 * Please see Documentation/firmware_class/ for more information. |
| 7 * | 7 * |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 #include <linux/capability.h> | 10 #include <linux/capability.h> |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 if (!fw_priv->fw->size || test_bit(FW_STATUS_ABORT, &fw_priv->status)) | 594 if (!fw_priv->fw->size || test_bit(FW_STATUS_ABORT, &fw_priv->status)) |
| 595 retval = -ENOENT; | 595 retval = -ENOENT; |
| 596 fw_priv->fw = NULL; | 596 fw_priv->fw = NULL; |
| 597 mutex_unlock(&fw_lock); | 597 mutex_unlock(&fw_lock); |
| 598 | 598 |
| 599 fw_destroy_instance(fw_priv); | 599 fw_destroy_instance(fw_priv); |
| 600 | 600 |
| 601 out: | 601 out: |
| 602 if (retval) { | 602 if (retval) { |
| 603 release_firmware(firmware); | 603 release_firmware(firmware); |
| 604 » » firmware_p = NULL; | 604 » » *firmware_p = NULL; |
| 605 } | 605 } |
| 606 | 606 |
| 607 return retval; | 607 return retval; |
| 608 } | 608 } |
| 609 | 609 |
| 610 /** | 610 /** |
| 611 * request_firmware: - send firmware request and wait for it | 611 * request_firmware: - send firmware request and wait for it |
| 612 * @firmware_p: pointer to firmware image | 612 * @firmware_p: pointer to firmware image |
| 613 * @name: name of firmware file | 613 * @name: name of firmware file |
| 614 * @device: device for which firmware is being loaded | 614 * @device: device for which firmware is being loaded |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 { | 738 { |
| 739 class_unregister(&firmware_class); | 739 class_unregister(&firmware_class); |
| 740 } | 740 } |
| 741 | 741 |
| 742 fs_initcall(firmware_class_init); | 742 fs_initcall(firmware_class_init); |
| 743 module_exit(firmware_class_exit); | 743 module_exit(firmware_class_exit); |
| 744 | 744 |
| 745 EXPORT_SYMBOL(release_firmware); | 745 EXPORT_SYMBOL(release_firmware); |
| 746 EXPORT_SYMBOL(request_firmware); | 746 EXPORT_SYMBOL(request_firmware); |
| 747 EXPORT_SYMBOL(request_firmware_nowait); | 747 EXPORT_SYMBOL(request_firmware_nowait); |
| OLD | NEW |