mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 14:41:39 +00:00
MMC host:
- atmel-mci: fix bad variable type for clkdiv -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJVWZYhAAoJEP4mhCVzWIwpJHwQAJX6NiFEVaKdVrDjOsW5wAOd xbg4vCOPM7hE0UeZ/IpBDC6yIFM5X9nynpD394/khW3IerFGVFlEPgkD5LCf27jV l3/W+CnR9YFLgBS/rsI0RVpRXqV1lmbcM8hvi6U1LRQjpqO3Fy5O6UuTMkbgd6eh xExcQ+WqpvJCAtqa93JpgvWlnubVHDthqVBErXGxi9Z5miqF00PTgUnrcmoDHa2+ fIqjiCWJTBYBIhrJn8BXPH+xkJwMS4p+keYhe1Q1Zjm1Ooct2d9tJ+ddSyYKoxLj Ts1eQ3zoPnpyct0cbWU/s9+VMNFieHomS6BTvr2kGUyBRRuVRjWS9jqHFNcqhHSs ex+ebpFi4e6UPIf91mLJ9iB0H7D2coe5BB1kRl4ImJFep5c707QMfg6C9rpUv2GO eyJhxKtR++PlhmwLdgYjq4jVjhCgf+eNIejhdnsrldYG5A2w7P1kgVtHn86SiKSv Ofv7OHzq9Q+4NkV3x+WDA3z7mMWBdAVuhGoqiti8Si8pwq0lMFlTMBePo0kvIMDg ZM4rLwiuxPbjXHnPKcnF6vpDgi4Aw0I4rgAlRkMZ9K2aGEQufLkoKrq3GaVb9zTf Pons0sJcVOz531vWUmazaxVyJPCTWdo53wXlzcN1kzYWdgf9ZUc420ib2nYj45pD NlmH/Ob0jyYcRPpwoYNl =9Ju7 -----END PGP SIGNATURE----- Merge tag 'mmc-4.1-rc3' of git://git.linaro.org/people/ulf.hansson/mmc Pull MMC fix from Ulf Hansson: "One more mmc fix intended for v4.1 rc5: MMC host: - atmel-mci: fix bad variable type for clkdiv" * tag 'mmc-4.1-rc3' of git://git.linaro.org/people/ulf.hansson/mmc: mmc: atmel-mci: fix bad variable type for clkdiv
This commit is contained in:
commit
97793a81b5
@ -1304,7 +1304,7 @@ static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
|
||||
|
||||
if (ios->clock) {
|
||||
unsigned int clock_min = ~0U;
|
||||
u32 clkdiv;
|
||||
int clkdiv;
|
||||
|
||||
spin_lock_bh(&host->lock);
|
||||
if (!host->mode_reg) {
|
||||
@ -1328,7 +1328,12 @@ static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
|
||||
/* Calculate clock divider */
|
||||
if (host->caps.has_odd_clk_div) {
|
||||
clkdiv = DIV_ROUND_UP(host->bus_hz, clock_min) - 2;
|
||||
if (clkdiv > 511) {
|
||||
if (clkdiv < 0) {
|
||||
dev_warn(&mmc->class_dev,
|
||||
"clock %u too fast; using %lu\n",
|
||||
clock_min, host->bus_hz / 2);
|
||||
clkdiv = 0;
|
||||
} else if (clkdiv > 511) {
|
||||
dev_warn(&mmc->class_dev,
|
||||
"clock %u too slow; using %lu\n",
|
||||
clock_min, host->bus_hz / (511 + 2));
|
||||
|
Loading…
Reference in New Issue
Block a user