diff options
| author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-02-26 15:34:42 -0500 |
|---|---|---|
| committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-02-26 15:34:42 -0500 |
| commit | 8e22e1b3499a446df48c2b26667ca36c55bf864c (patch) | |
| tree | 5329f98b3eb3c95a9dcbab0fa4f9b6e62f0e788d /drivers/gpu/drm/nouveau/nouveau_led.c | |
| parent | 00d3c14f14d51babd8aeafd5fa734ccf04f5ca3d (diff) | |
| parent | 64a577196d66b44e37384bc5c4d78c61f59d5b2a (diff) | |
Merge airlied/drm-next into drm-misc-next
Backmerge the main pull request to sync up with all the newly landed
drivers. Otherwise we'll have chaos even before 4.12 started in
earnest.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_led.c')
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_led.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_led.c b/drivers/gpu/drm/nouveau/nouveau_led.c index 3e2f1b6cd4df..2c5e0628da12 100644 --- a/drivers/gpu/drm/nouveau/nouveau_led.c +++ b/drivers/gpu/drm/nouveau/nouveau_led.c | |||
| @@ -38,7 +38,7 @@ nouveau_led_get_brightness(struct led_classdev *led) | |||
| 38 | { | 38 | { |
| 39 | struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev; | 39 | struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev; |
| 40 | struct nouveau_drm *drm = nouveau_drm(drm_dev); | 40 | struct nouveau_drm *drm = nouveau_drm(drm_dev); |
| 41 | struct nvif_object *device = &drm->device.object; | 41 | struct nvif_object *device = &drm->client.device.object; |
| 42 | u32 div, duty; | 42 | u32 div, duty; |
| 43 | 43 | ||
| 44 | div = nvif_rd32(device, 0x61c880) & 0x00ffffff; | 44 | div = nvif_rd32(device, 0x61c880) & 0x00ffffff; |
| @@ -55,7 +55,7 @@ nouveau_led_set_brightness(struct led_classdev *led, enum led_brightness value) | |||
| 55 | { | 55 | { |
| 56 | struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev; | 56 | struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev; |
| 57 | struct nouveau_drm *drm = nouveau_drm(drm_dev); | 57 | struct nouveau_drm *drm = nouveau_drm(drm_dev); |
| 58 | struct nvif_object *device = &drm->device.object; | 58 | struct nvif_object *device = &drm->client.device.object; |
| 59 | 59 | ||
| 60 | u32 input_clk = 27e6; /* PDISPLAY.SOR[1].PWM is connected to the crystal */ | 60 | u32 input_clk = 27e6; /* PDISPLAY.SOR[1].PWM is connected to the crystal */ |
| 61 | u32 freq = 100; /* this is what nvidia uses and it should be good-enough */ | 61 | u32 freq = 100; /* this is what nvidia uses and it should be good-enough */ |
| @@ -78,7 +78,7 @@ int | |||
| 78 | nouveau_led_init(struct drm_device *dev) | 78 | nouveau_led_init(struct drm_device *dev) |
| 79 | { | 79 | { |
| 80 | struct nouveau_drm *drm = nouveau_drm(dev); | 80 | struct nouveau_drm *drm = nouveau_drm(dev); |
| 81 | struct nvkm_gpio *gpio = nvxx_gpio(&drm->device); | 81 | struct nvkm_gpio *gpio = nvxx_gpio(&drm->client.device); |
| 82 | struct dcb_gpio_func logo_led; | 82 | struct dcb_gpio_func logo_led; |
| 83 | int ret; | 83 | int ret; |
| 84 | 84 | ||
| @@ -102,6 +102,7 @@ nouveau_led_init(struct drm_device *dev) | |||
| 102 | ret = led_classdev_register(dev->dev, &drm->led->led); | 102 | ret = led_classdev_register(dev->dev, &drm->led->led); |
| 103 | if (ret) { | 103 | if (ret) { |
| 104 | kfree(drm->led); | 104 | kfree(drm->led); |
| 105 | drm->led = NULL; | ||
| 105 | return ret; | 106 | return ret; |
| 106 | } | 107 | } |
| 107 | 108 | ||
