mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
Mali: utgard: Use platform_get_irq_byname() to obtain IRQ numbers
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com> Change-Id: Ie49ec94549e24312c8f7620b99819b0b90353192
This commit is contained in:
@@ -123,7 +123,7 @@ _mali_osk_errcode_t _mali_osk_resource_initialize(void)
|
||||
{
|
||||
mali_bool mali_is_450 = MALI_FALSE, mali_is_470 = MALI_FALSE;
|
||||
int i, pp_core_num = 0, l2_core_num = 0;
|
||||
struct resource *res;
|
||||
int irq;
|
||||
const char *compatible_name = NULL;
|
||||
|
||||
if (0 == _mali_osk_get_compatible_name(&compatible_name)) {
|
||||
@@ -137,12 +137,11 @@ _mali_osk_errcode_t _mali_osk_resource_initialize(void)
|
||||
}
|
||||
|
||||
for (i = 0; i < MALI_OSK_RESOURCE_WITH_IRQ_NUMBER; i++) {
|
||||
res = platform_get_resource_byname(mali_platform_device, IORESOURCE_IRQ, mali_osk_resource_bank[i].irq_name);
|
||||
if (res) {
|
||||
mali_osk_resource_bank[i].irq = res->start;
|
||||
} else {
|
||||
irq = platform_get_irq_byname(mali_platform_device, mali_osk_resource_bank[i].irq_name);
|
||||
if (irq < 0)
|
||||
mali_osk_resource_bank[i].base = MALI_OSK_INVALID_RESOURCE_ADDRESS;
|
||||
}
|
||||
else
|
||||
mali_osk_resource_bank[i].irq = irq;
|
||||
}
|
||||
|
||||
for (i = MALI_OSK_RESOURCE_PP_LOCATION_START; i <= MALI_OSK_RESOURCE_PP_LOCATION_END; i++) {
|
||||
|
||||
Reference in New Issue
Block a user