Commit 1364b02f authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: drivers.c: remove unused inline functions

Remove the inline functions uvirt_to_kva and kvirt_to_kva, they
are not referenced by any of the drivers.c code.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5b28e55e
...@@ -383,39 +383,6 @@ static int insn_rw_emulate_bits(struct comedi_device *dev, ...@@ -383,39 +383,6 @@ static int insn_rw_emulate_bits(struct comedi_device *dev,
return 1; return 1;
} }
static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr)
{
unsigned long ret = 0UL;
pmd_t *pmd;
pte_t *ptep, pte;
pud_t *pud;
if (!pgd_none(*pgd)) {
pud = pud_offset(pgd, adr);
pmd = pmd_offset(pud, adr);
if (!pmd_none(*pmd)) {
ptep = pte_offset_kernel(pmd, adr);
pte = *ptep;
if (pte_present(pte)) {
ret = (unsigned long)
page_address(pte_page(pte));
ret |= (adr & (PAGE_SIZE - 1));
}
}
}
return ret;
}
static inline unsigned long kvirt_to_kva(unsigned long adr)
{
unsigned long va, kva;
va = adr;
kva = uvirt_to_kva(pgd_offset_k(va), va);
return kva;
}
int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s, int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned long new_size) unsigned long new_size)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment