led_get_default_pattern(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– led_get_default_pattern(9) β€” like, the Kernel API Manual page, bestie πŸ’–

Okay so welcome to led_get_default_pattern(9), straight out of the Kernel API Manual ✨ grab a lil snack, this one's short and sweet πŸ“


🌸 NAME 🌸

led_get_default_pattern β€” returns the default pattern πŸŽ€ lowkey does exactly what it says on the tin, no cap


✨ SYNOPSIS ✨

u32 * led_get_default_pattern (struct led_classdev *led_cdev , unsigned
int *size );

That's the whole vibe right there πŸ‘‘ a u32 * coming back at you, takes a struct led_classdev * and an unsigned int *, iconic signature honestly πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • led_cdev β€” the LED you're getting the default pattern for πŸ’‘ it's giving "which LED bestie"
  • size β€” a pointer for storing the number of elements in the returned array 🌈 and here's the tea: it's modified only if the return is != NULL 😭 so don't go reading it if you got nothing back

πŸ’œ RETURN πŸ’œ

You get an allocated array of integers with the default pattern from the device tree, or NULL if there isn't one 🧚

⚠️ Bestie, listen: the caller is responsible for kfree. That array is yours now. You allocated it (well, the function did, for you), you free it. Periodt πŸ’€

🌟 SEE ALSO 🌟

Kernel file ./include/linux/leds.h β€” go read it, iykyk πŸ“– and also all of these cuties:


mwah πŸ’‹ that's the page! This lil beauty lives in ./include/linux and the version/date stamp on it is October 2026, filed under led_get_default_pattern(9) 🫢 go forth and free your arrays, bestie 🌈⭐

πŸ“¦ where this page comes from