drm/amd/display: refactor gpio to allocate hw_container in constructor
[why] if dynamic allocation fails during gpio_open, it will cause crash due to page fault. [how] handle allocation when gpio object gets created and prevent from calling gpio_open if allocation failed Signed-off-by: Su Sung Chung <Su.Chung@amd.com> Reviewed-by: Jun Lei <Jun.Lei@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Alex Deucher

vecāks
37495fbdf1
revīzija
91db931194
@@ -93,8 +93,17 @@ enum sync_source dal_gpio_get_sync_source(
|
||||
enum gpio_pin_output_state dal_gpio_get_output_state(
|
||||
const struct gpio *gpio);
|
||||
|
||||
struct hw_ddc *dal_gpio_get_ddc(struct gpio *gpio);
|
||||
|
||||
struct hw_hpd *dal_gpio_get_hpd(struct gpio *gpio);
|
||||
|
||||
struct hw_generic *dal_gpio_get_generic(struct gpio *gpio);
|
||||
|
||||
/* Close the handle */
|
||||
void dal_gpio_close(
|
||||
struct gpio *gpio);
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user