0002-sf-consistently-use-debug-for-warning-error-messages.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. From bb7df8c6ff30be3786483767d3afb0e77a69a640 Mon Sep 17 00:00:00 2001
  2. From: Daniel Schwierzeck <[email protected]>
  3. Date: Sat, 12 Oct 2013 21:21:18 +0200
  4. Subject: sf: consistently use debug() for warning/error messages
  5. Signed-off-by: Daniel Schwierzeck <[email protected]>
  6. diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
  7. index 5eb8ffe..04356f1 100644
  8. --- a/drivers/mtd/spi/sf_probe.c
  9. +++ b/drivers/mtd/spi/sf_probe.c
  10. @@ -176,8 +176,8 @@ static struct spi_flash *spi_flash_validate_params(struct spi_slave *spi,
  11. }
  12. if (i == ARRAY_SIZE(spi_flash_params_table)) {
  13. - printf("SF: Unsupported flash IDs: ");
  14. - printf("manuf %02x, jedec %04x, ext_jedec %04x\n",
  15. + debug("SF: Unsupported flash IDs: ");
  16. + debug("manuf %02x, jedec %04x, ext_jedec %04x\n",
  17. idcode[0], jedec, ext_jedec);
  18. return NULL;
  19. }
  20. @@ -296,7 +296,7 @@ struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs,
  21. /* Setup spi_slave */
  22. spi = spi_setup_slave(bus, cs, max_hz, spi_mode);
  23. if (!spi) {
  24. - printf("SF: Failed to set up slave\n");
  25. + debug("SF: Failed to set up slave\n");
  26. return NULL;
  27. }
  28. @@ -310,7 +310,7 @@ struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs,
  29. /* Read the ID codes */
  30. ret = spi_flash_cmd(spi, CMD_READ_ID, idcode, sizeof(idcode));
  31. if (ret) {
  32. - printf("SF: Failed to get idcodes\n");
  33. + debug("SF: Failed to get idcodes\n");
  34. goto err_read_id;
  35. }
  36. @@ -341,8 +341,8 @@ struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs,
  37. #endif
  38. #ifndef CONFIG_SPI_FLASH_BAR
  39. if (flash->size > SPI_FLASH_16MB_BOUN) {
  40. - puts("SF: Warning - Only lower 16MiB accessible,");
  41. - puts(" Full access #define CONFIG_SPI_FLASH_BAR\n");
  42. + debug("SF: Warning - Only lower 16MiB accessible,");
  43. + debug(" Full access #define CONFIG_SPI_FLASH_BAR\n");
  44. }
  45. #endif
  46. --
  47. 1.8.3.2