ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally
Make this helper inline function available for all platforms. This helps solve 0-day compilation issues when CONFIG_SND_DMA_SGBUF is not defined. -----BEGIN PGP SIGNATURE----- iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAltZ8WYTHGJyb29uaWVA a2VybmVsLm9yZwAKCRAk1otyXVSH0CFPB/9dor5jPnP7uCj0ukCGHvWoVy4t4HBF gfHE8ida6iG8Wbxiu9IlP5UfjqnAhOzirwhVQwLTSSykg9pvqx9mqe84Hi0BU2V/ g/ojqw3uY902BNpGn4DaMgaHyf9RwG0ZUdm//7XNqjKwMySPrJK+CrDqFXSJLkvZ xjALUiU2LW5POAeZEuP3N4zz5a18aNaaMVrBCVtV39WWKxRdUm96SGVw7V9DLipB qq7GR9wRcazUEn1MhorU9WXsfQYSxpCWH2MqLttMwk574CWo/gMHZyTrJtf+lFxX OOCH2wN6qWE2gXEFG/aCnfKS1TzWlkIlvx035QGBUAmvGXoVNvSqHhzS =FsV/ -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAltZ8g0THGJyb29uaWVA a2VybmVsLm9yZwAKCRAk1otyXVSH0MydB/98q4L86WvguNo0OsJ1NuUbyqUBaT4p +niwGJbcoYuKT1wx8D4jaGUo+UdNHsuRHSDWUbqdMhfkc+UBK+QrdF8MHVSW2Bie w/5OYkKiVPXHYM3ISdcpNqDPe9Of1IRJwHQ6WANOQ5dk3WLgvD/dNiN6tvjrJkhg /bcrKkCCbWaK+69rlNwMaOu43LDED102aQbbyeT5Rdhm/xXCRQgohGQwYV32wJAv sT4ZVzRkFEemc+cecD7fvCx8phSYRWA0qkso/mTog1Cx7u/Y06oVFnIHllq/68VR McGran3+XYee1Fdkj2aTCEQ8Ra214fAcdJ2t2UkgrSAX4jJZ4ry0tKfh =QfMT -----END PGP SIGNATURE----- Merge tag 'alsa-add-snd-sgbuf-aligned-pages' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-4.19 ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally Make this helper inline function available for all platforms. This helps solve 0-day compilation issues when CONFIG_SND_DMA_SGBUF is not defined.
This commit is contained in:
commit
fd56361177
|
@ -67,6 +67,14 @@ struct snd_dma_buffer {
|
|||
void *private_data; /* private for allocator; don't touch */
|
||||
};
|
||||
|
||||
/*
|
||||
* return the pages matching with the given byte size
|
||||
*/
|
||||
static inline unsigned int snd_sgbuf_aligned_pages(size_t size)
|
||||
{
|
||||
return (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SND_DMA_SGBUF
|
||||
/*
|
||||
* Scatter-Gather generic device pages
|
||||
|
@ -90,14 +98,6 @@ struct snd_sg_buf {
|
|||
struct device *dev;
|
||||
};
|
||||
|
||||
/*
|
||||
* return the pages matching with the given byte size
|
||||
*/
|
||||
static inline unsigned int snd_sgbuf_aligned_pages(size_t size)
|
||||
{
|
||||
return (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
|
||||
}
|
||||
|
||||
/*
|
||||
* return the physical address at the corresponding offset
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue