The detection probably works, but only if the file system is created directly on the block device (without any partition table). Error reporting is somewhat obscure:
The user would only see a message like
without knowing which file this is referring to, and what the impact of the failure is.
(The code requires read access to the block device, to determine some of its capabilities. Maybe vendors should try to provide the information via the /sys file system.)
Finally, should a user have multiple types of SSD installed in the same server, not all subsystems would be initialized in my_init_atomic_write().