drivers/char: for hpet, add count checking, and ~0UL instead of -1