* The function calculates parameters for all cases and chooses the one closest
* to the asked baud rate.
*/
-static unsigned int quark_x1000_get_clk_div(int rate, u32 *dds)
+static unsigned int quark_x1000_get_clk_div(u32 rate, u32 *dds)
{
unsigned long xtal = 200000000;
unsigned long fref = xtal / 2; /* mandatory division by 2,
return q - 1;
}
-static unsigned int ssp_get_clk_div(struct driver_data *drv_data, int rate)
+static unsigned int ssp_get_clk_div(struct driver_data *drv_data, u32 rate)
{
- unsigned long ssp_clk = drv_data->controller->max_speed_hz;
+ u32 ssp_clk = drv_data->controller->max_speed_hz;
const struct ssp_device *ssp = drv_data->ssp;
- rate = min_t(int, ssp_clk, rate);
+ rate = min(ssp_clk, rate);
/*
* Calculate the divisor for the SCR (Serial Clock Rate), avoiding
return (DIV_ROUND_UP(ssp_clk, rate) - 1) & 0xfff;
}
-static unsigned int pxa2xx_ssp_get_clk_div(struct driver_data *drv_data,
- int rate)
+static unsigned int pxa2xx_ssp_get_clk_div(struct driver_data *drv_data, u32 rate)
{
struct chip_data *chip =
spi_get_ctldata(drv_data->controller->cur_msg->spi);