Alexander Usyskin 6c3662a2c5 UPSTREAM: mtd: call external _get and _put in right order
MTD provider provides mtd_info object to mtd subsystem.
With kref patch the mtd_info object can be alive after
provider released mtd device.
Fix calling order in _get and _put functions to allow
mtd provider to safely alloc and release mtd object.

Execute:
1) call external _get
2) get_module
3) add internal kref
in the get function and opposite order in the put one.

The _put_device callback should be the last in put
as the master struct memory may be freed in this callback.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230620131905.648089-3-alexander.usyskin@intel.com
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 79c4a56250)
Change-Id: I12b1b5f3ac0bcc432cee429c5c56a057e0a2e589
2025-01-20 09:04:43 +00:00
2025-01-10 17:48:57 +08:00
2025-01-10 17:48:57 +08:00
2025-01-10 17:48:57 +08:00
2025-01-10 17:48:57 +08:00
2025-01-10 17:48:57 +08:00
2025-01-10 17:48:57 +08:00
2025-01-10 17:48:57 +08:00
2025-01-10 17:48:57 +08:00
2025-01-10 17:48:57 +08:00
2025-01-10 17:48:57 +08:00
2022-09-28 09:02:20 +02:00
2024-11-01 01:56:07 +01:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 7.9 GiB
Languages
C 97.7%
Assembly 1.6%
Makefile 0.3%
Perl 0.1%