diff options
-rw-r--r-- | drivers/video/backlight/tosa_bl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/video/backlight/tosa_bl.c b/drivers/video/backlight/tosa_bl.c index b8db9338cacd..3ad676558c80 100644 --- a/drivers/video/backlight/tosa_bl.c +++ b/drivers/video/backlight/tosa_bl.c | |||
@@ -105,8 +105,9 @@ static int tosa_bl_probe(struct i2c_client *client, | |||
105 | memset(&props, 0, sizeof(struct backlight_properties)); | 105 | memset(&props, 0, sizeof(struct backlight_properties)); |
106 | props.type = BACKLIGHT_RAW; | 106 | props.type = BACKLIGHT_RAW; |
107 | props.max_brightness = 512 - 1; | 107 | props.max_brightness = 512 - 1; |
108 | data->bl = backlight_device_register("tosa-bl", &client->dev, data, | 108 | data->bl = devm_backlight_device_register(&client->dev, "tosa-bl", |
109 | &bl_ops, &props); | 109 | &client->dev, data, &bl_ops, |
110 | &props); | ||
110 | if (IS_ERR(data->bl)) { | 111 | if (IS_ERR(data->bl)) { |
111 | ret = PTR_ERR(data->bl); | 112 | ret = PTR_ERR(data->bl); |
112 | goto err_reg; | 113 | goto err_reg; |
@@ -128,9 +129,7 @@ static int tosa_bl_remove(struct i2c_client *client) | |||
128 | { | 129 | { |
129 | struct tosa_bl_data *data = i2c_get_clientdata(client); | 130 | struct tosa_bl_data *data = i2c_get_clientdata(client); |
130 | 131 | ||
131 | backlight_device_unregister(data->bl); | ||
132 | data->bl = NULL; | 132 | data->bl = NULL; |
133 | |||
134 | return 0; | 133 | return 0; |
135 | } | 134 | } |
136 | 135 | ||