Johnson Controls has announced that it swung to a fiscal second quarter profit, boosted by much higher revenues in its automotive division.