mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
wireless: ipw2200: Replace PCI pool old API
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier <romain.perier@collabora.com> Reviewed-by: Peter Senna Tschudin <peter.senna@collabora.com> Acked-by: Stanislav Yakovlev <stas.yakovlev@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
2cc8918eb9
commit
28b75415ad
1 changed files with 7 additions and 6 deletions
|
@ -3209,7 +3209,7 @@ static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len)
|
||||||
struct fw_chunk *chunk;
|
struct fw_chunk *chunk;
|
||||||
int total_nr = 0;
|
int total_nr = 0;
|
||||||
int i;
|
int i;
|
||||||
struct pci_pool *pool;
|
struct dma_pool *pool;
|
||||||
void **virts;
|
void **virts;
|
||||||
dma_addr_t *phys;
|
dma_addr_t *phys;
|
||||||
|
|
||||||
|
@ -3226,9 +3226,10 @@ static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len)
|
||||||
kfree(virts);
|
kfree(virts);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
pool = pci_pool_create("ipw2200", priv->pci_dev, CB_MAX_LENGTH, 0, 0);
|
pool = dma_pool_create("ipw2200", &priv->pci_dev->dev, CB_MAX_LENGTH, 0,
|
||||||
|
0);
|
||||||
if (!pool) {
|
if (!pool) {
|
||||||
IPW_ERROR("pci_pool_create failed\n");
|
IPW_ERROR("dma_pool_create failed\n");
|
||||||
kfree(phys);
|
kfree(phys);
|
||||||
kfree(virts);
|
kfree(virts);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -3253,7 +3254,7 @@ static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len)
|
||||||
|
|
||||||
nr = (chunk_len + CB_MAX_LENGTH - 1) / CB_MAX_LENGTH;
|
nr = (chunk_len + CB_MAX_LENGTH - 1) / CB_MAX_LENGTH;
|
||||||
for (i = 0; i < nr; i++) {
|
for (i = 0; i < nr; i++) {
|
||||||
virts[total_nr] = pci_pool_alloc(pool, GFP_KERNEL,
|
virts[total_nr] = dma_pool_alloc(pool, GFP_KERNEL,
|
||||||
&phys[total_nr]);
|
&phys[total_nr]);
|
||||||
if (!virts[total_nr]) {
|
if (!virts[total_nr]) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
@ -3297,9 +3298,9 @@ static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len)
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
for (i = 0; i < total_nr; i++)
|
for (i = 0; i < total_nr; i++)
|
||||||
pci_pool_free(pool, virts[i], phys[i]);
|
dma_pool_free(pool, virts[i], phys[i]);
|
||||||
|
|
||||||
pci_pool_destroy(pool);
|
dma_pool_destroy(pool);
|
||||||
kfree(phys);
|
kfree(phys);
|
||||||
kfree(virts);
|
kfree(virts);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue