PNP / ACPI: use u8 instead of int in acpi_resource_extended_irq context

acpi_resource_extented_irq variables are all u8.
Use that type for triggering, polarity and shareable.
This fixes gcc warnings of type
"conversion to u8 from int may alter its value"

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Fabian Frederick 2015-05-02 17:14:49 +02:00 коммит произвёл Rafael J. Wysocki
Родитель 5ebe6afaf0
Коммит bbee06d067
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -28,8 +28,8 @@
#include "../base.h" #include "../base.h"
#include "pnpacpi.h" #include "pnpacpi.h"
static void decode_irq_flags(struct pnp_dev *dev, int flags, int *triggering, static void decode_irq_flags(struct pnp_dev *dev, int flags, u8 *triggering,
int *polarity, int *shareable) u8 *polarity, u8 *shareable)
{ {
switch (flags & (IORESOURCE_IRQ_LOWLEVEL | IORESOURCE_IRQ_HIGHLEVEL | switch (flags & (IORESOURCE_IRQ_LOWLEVEL | IORESOURCE_IRQ_HIGHLEVEL |
IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE)) { IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE)) {
@ -654,7 +654,7 @@ static void pnpacpi_encode_irq(struct pnp_dev *dev,
struct resource *p) struct resource *p)
{ {
struct acpi_resource_irq *irq = &resource->data.irq; struct acpi_resource_irq *irq = &resource->data.irq;
int triggering, polarity, shareable; u8 triggering, polarity, shareable;
if (!pnp_resource_enabled(p)) { if (!pnp_resource_enabled(p)) {
irq->interrupt_count = 0; irq->interrupt_count = 0;
@ -683,7 +683,7 @@ static void pnpacpi_encode_ext_irq(struct pnp_dev *dev,
struct resource *p) struct resource *p)
{ {
struct acpi_resource_extended_irq *extended_irq = &resource->data.extended_irq; struct acpi_resource_extended_irq *extended_irq = &resource->data.extended_irq;
int triggering, polarity, shareable; u8 triggering, polarity, shareable;
if (!pnp_resource_enabled(p)) { if (!pnp_resource_enabled(p)) {
extended_irq->interrupt_count = 0; extended_irq->interrupt_count = 0;