Rory McIlroy is confident he has “straightened out” his waywardness ahead of this week’s US PGA Championship.