static int hp680bl_suspend(struct platform_device *pdev, pm_message_t state) { struct backlight_device *bd = platform_get_drvdata(pdev); hp680bl_suspended = 1; hp680bl_send_intensity(bd); return 0; }
static int hp680bl_resume(struct platform_device *pdev) { struct backlight_device *bd = platform_get_drvdata(pdev); hp680bl_suspended = 0; hp680bl_send_intensity(bd); return 0; }
static int hp680bl_resume(struct device *dev) { struct backlight_device *bd = dev_get_drvdata(dev); hp680bl_suspended = 0; hp680bl_send_intensity(bd); return 0; }
static int hp680bl_remove(struct platform_device *pdev) { struct backlight_device *bd = platform_get_drvdata(pdev); bd->props.brightness = 0; bd->props.power = 0; hp680bl_send_intensity(bd); return 0; }
static int hp680bl_remove(struct platform_device *pdev) { struct backlight_device *bd = platform_get_drvdata(pdev); hp680bl_data.brightness = 0; hp680bl_data.power = 0; hp680bl_send_intensity(bd); backlight_device_unregister(bd); return 0; }
static int __init hp680bl_probe(struct platform_device *pdev) { struct backlight_device *bd; bd = backlight_device_register ("hp680-bl", &pdev->dev, NULL, &hp680bl_ops); if (IS_ERR(bd)) return PTR_ERR(bd); platform_set_drvdata(pdev, bd); bd->props.max_brightness = HP680_MAX_INTENSITY; bd->props.brightness = HP680_DEFAULT_INTENSITY; hp680bl_send_intensity(bd); return 0; }
static int __devinit hp680bl_probe(struct platform_device *pdev) { struct backlight_properties props; struct backlight_device *bd; memset(&props, 0, sizeof(struct backlight_properties)); props.type = BACKLIGHT_RAW; props.max_brightness = HP680_MAX_INTENSITY; bd = backlight_device_register("hp680-bl", &pdev->dev, NULL, &hp680bl_ops, &props); if (IS_ERR(bd)) return PTR_ERR(bd); platform_set_drvdata(pdev, bd); bd->props.brightness = HP680_DEFAULT_INTENSITY; hp680bl_send_intensity(bd); return 0; }
static int hp680bl_set_intensity(struct backlight_device *bd) { hp680bl_send_intensity(bd); return 0; }