devm_of_find_backlight(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– devm_of_find_backlight(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” this one's a little function page called devm_of_find_backlight, and honestly? she's a whole vibe. let's get into it πŸŽ€


✨ SYNOPSIS ✨

struct backlight_device * devm_of_find_backlight (struct device *dev );

yeah that's it. one arg, one return, no drama πŸ’…


🌸 ARGUMENTS 🌸

  • dev β€” the device. that's the whole description, she's lowkey mysterious like that πŸ¦‹

πŸ‘‘ DESCRIPTION πŸ‘‘

so what does she even do? okay so: this function goes looking for a property named backlight on the DT node that's connected to dev, and then it looks up the backlight device for you. easy ✨

and here's the iconic part β€” the lookup is device managed, which means the reference to the backlight device gets dropped automatically on driver detach. no manual cleanup, no put calls, nothing. she handles it. main character energy fr fr πŸ”₯

now, the returns, listen up:

  • a pointer to the backlight device, if it's found 🫢
  • an error pointer -EPROBE_DEFER if the DT property is set, but no backlight device gets found 😭
  • NULL if there's just no backlight property at all πŸ’€
ngl, that -EPROBE_DEFER case is the sneaky one β€” property's there, device isn't, and you get an error pointer, not NULL. don't mix them up bestie πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, i'm obsessed with all of them:


and that's the page!! no cap, you got this πŸŒˆπŸ’œ

sign-off szn: this one comes to you from ./drivers/video/backlight, dated October 2026 β€” mwah, go forth and find those backlights πŸ§šβ­πŸ“

πŸ“¦ where this page comes from