Nothing.
If you cannot trust your hardware, you cannot trust it.
There does not exist a universal way of updating keyboard controllers, and certainly there is no universal introspection for them. While you could reflash those keyboards that are reflashable every time the system boots or a keyboard is plugged in, you'd have to come up with a way to do this for every flashable keyboard, not to mention trust the "clean" firmware, and then you'd have built into your system a way for an attacker to flash the keyboard. This is likely not a productive use of time.
The hack described merely causes the keyboard to act as a hardware keylogger, if I read correctly. Apple's patch requires that users have elevated privileges to update the keyboard's firmware, as it should be. Linux, to my knowledge, doesn't have widely-used drivers for doing such an update, and if you don't want one to ever be done, don't compile such things into your kernel (or load modules for it). You already need root to load modules or update the kernel (typically).
The best way to guard against such things as these is to protect access to your hardware (to prevent retrieval of logged keystrokes). If there were a way to inspect the data in the keyboard remotely without the user noticing, that would be its own bug to be patched.
This problem is somewhat unique to Apple, who have created a high level of homogeneity for attackers, given attackers access to exploit it with only normal user rights (since patched, as cited), and created keyboards complex enough to facilitate such an attack. You could guard against it by using a simpler keyboard without flashable firmware, if you're worried about such things as this.