static void backlight_class_release(struct class_device *dev)
{
  struct backlight_device *bd = to_backlight_device(dev);
  kfree(bd);
}

static struct class backlight_class = {
  .name    = "backlight",
  .release = backlight_class_release,
};

static int __init backlight_class_init(void)
{
  return class_register(&backlight_class);
}