Repository navigation
Commit 45bbe00
serial: amba-pl011: do not request memory region twice
[ Upstream commit d118040 ]
With commit 3873e2d ("drivers: PL011: refactor pl011_probe()") the
function devm_ioremap() called from pl011_setup_port() was replaced with
devm_ioremap_resource(). Since this function not only remaps but also
requests the ports io memory region it now collides with the .config_port()
callback which requests the same region at uart port registration.
Since devm_ioremap_resource() already claims the memory successfully, the
request in .config_port() fails.
Later at uart port deregistration the attempt to release the unclaimed
memory also fails. The failure results in a “Trying to free nonexistent
resource" warning.
Fix these issues by removing the callbacks that implement the redundant
memory allocation/release. Also make sure that changing the drivers io
memory base address via TIOCSSERIAL is not allowed any more.
Fixes: 3873e2d ("drivers: PL011: refactor pl011_probe()")
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Link: https://lore.kernel.org/r/20211129174238.8333-1-LinoSanfilippo@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 8409d23 commit 45bbe00
1 file changed
Lines changed: 3 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2083 | 2083 | | |
2084 | 2084 | | |
2085 | 2085 | | |
2086 | | - | |
2087 | | - | |
2088 | | - | |
2089 | | - | |
2090 | | - | |
2091 | | - | |
2092 | | - | |
2093 | | - | |
2094 | | - | |
2095 | | - | |
2096 | | - | |
2097 | | - | |
2098 | | - | |
2099 | | - | |
2100 | | - | |
2101 | | - | |
2102 | | - | |
2103 | 2086 | | |
2104 | 2087 | | |
2105 | 2088 | | |
2106 | 2089 | | |
2107 | 2090 | | |
2108 | | - | |
| 2091 | + | |
2109 | 2092 | | |
2110 | | - | |
2111 | | - | |
2112 | 2093 | | |
2113 | 2094 | | |
2114 | 2095 | | |
| |||
2123 | 2104 | | |
2124 | 2105 | | |
2125 | 2106 | | |
| 2107 | + | |
| 2108 | + | |
2126 | 2109 | | |
2127 | 2110 | | |
2128 | 2111 | | |
| |||
2140 | 2123 | | |
2141 | 2124 | | |
2142 | 2125 | | |
2143 | | - | |
2144 | | - | |
2145 | 2126 | | |
2146 | 2127 | | |
2147 | 2128 | | |
| |||
2171 | 2152 | | |
2172 | 2153 | | |
2173 | 2154 | | |
2174 | | - | |
2175 | | - | |
2176 | 2155 | | |
2177 | 2156 | | |
2178 | 2157 | | |
| |||
0 commit comments