mirror of https://gitee.com/openkylin/linux.git
firmware: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN
use mm.h definition Cc: Ming Lei <ming.lei@canonical.com> Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6af6b163b3
commit
a76040d835
|
@ -712,7 +712,7 @@ static ssize_t firmware_data_read(struct file *filp, struct kobject *kobj,
|
|||
static int fw_realloc_buffer(struct firmware_priv *fw_priv, int min_size)
|
||||
{
|
||||
struct firmware_buf *buf = fw_priv->buf;
|
||||
int pages_needed = ALIGN(min_size, PAGE_SIZE) >> PAGE_SHIFT;
|
||||
int pages_needed = PAGE_ALIGN(min_size) >> PAGE_SHIFT;
|
||||
|
||||
/* If the array of pages is too small, grow it... */
|
||||
if (buf->page_array_size < pages_needed) {
|
||||
|
|
Loading…
Reference in New Issue