diff mbox

[v2,1/4,media] lirc_bt829: Fix physical address type

Message ID 1378348275.27597.15.camel@deadeye.wl.decadent.org.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Hutchings Sept. 5, 2013, 2:31 a.m. UTC
Use phys_addr_t and log format %pa.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/staging/media/lirc/lirc_bt829.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Fabio Estevam Sept. 5, 2013, 3:05 a.m. UTC | #1
On Wed, Sep 4, 2013 at 11:31 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> Use phys_addr_t and log format %pa.
>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
>  drivers/staging/media/lirc/lirc_bt829.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/media/lirc/lirc_bt829.c b/drivers/staging/media/lirc/lirc_bt829.c
> index fa31ee7..9c7be55 100644
> --- a/drivers/staging/media/lirc/lirc_bt829.c
> +++ b/drivers/staging/media/lirc/lirc_bt829.c
> @@ -63,7 +63,7 @@ static bool debug;
>         } while (0)
>
>  static int atir_minor;
> -static unsigned long pci_addr_phys;
> +static phys_addr_t pci_addr_phys;
>  static unsigned char *pci_addr_lin;
>
>  static struct lirc_driver atir_driver;
> @@ -78,8 +78,7 @@ static struct pci_dev *do_pci_probe(void)
>                 pci_addr_phys = 0;
>                 if (my_dev->resource[0].flags & IORESOURCE_MEM) {
>                         pci_addr_phys = my_dev->resource[0].start;
> -                       pr_info("memory at 0x%08X\n",
> -                              (unsigned int)pci_addr_phys);
> +                       pr_info("memory at %pa\n", &pci_addr_phys);

Looks much better :-)

Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/staging/media/lirc/lirc_bt829.c b/drivers/staging/media/lirc/lirc_bt829.c
index fa31ee7..9c7be55 100644
--- a/drivers/staging/media/lirc/lirc_bt829.c
+++ b/drivers/staging/media/lirc/lirc_bt829.c
@@ -63,7 +63,7 @@  static bool debug;
 	} while (0)
 
 static int atir_minor;
-static unsigned long pci_addr_phys;
+static phys_addr_t pci_addr_phys;
 static unsigned char *pci_addr_lin;
 
 static struct lirc_driver atir_driver;
@@ -78,8 +78,7 @@  static struct pci_dev *do_pci_probe(void)
 		pci_addr_phys = 0;
 		if (my_dev->resource[0].flags & IORESOURCE_MEM) {
 			pci_addr_phys = my_dev->resource[0].start;
-			pr_info("memory at 0x%08X\n",
-			       (unsigned int)pci_addr_phys);
+			pr_info("memory at %pa\n", &pci_addr_phys);
 		}
 		if (pci_addr_phys == 0) {
 			pr_err("no memory resource ?\n");