> Date: Wed, 12 Jan 2022 09:08:57 -0800 > From: Jason Thorpe <thor...@me.com> > > Any place where there's an "#ifdef FDT" is a failure to create a > proper abstraction.
I tend to agree that #if is bad, but just deleting #if without a better replacement isn't the right thing. What's the pattern that the fdt regulators are an instance of, which this should be replaced by? The only reason #if occurs in linux/regulator/consumer.h is that that gets included by a header file (nvif/os.h) that is also used on non-fdt platforms. The API itself is only used by tegra drm, as far as I know. (Could have put the #if in that header file instead, but that would have made it a local patch which is more trouble for merging.)