sh-pfc: Turn unsigned indices into unsigned int
Some indices take positive values only, make them unsigned. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
c420619d51
commit
8d72a7fc8d
|
@ -29,7 +29,7 @@
|
||||||
static int sh_pfc_ioremap(struct sh_pfc *pfc, struct platform_device *pdev)
|
static int sh_pfc_ioremap(struct sh_pfc *pfc, struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
int k;
|
unsigned int k;
|
||||||
|
|
||||||
if (pdev->num_resources == 0)
|
if (pdev->num_resources == 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -147,7 +147,7 @@ static void sh_pfc_config_reg_helper(struct sh_pfc *pfc,
|
||||||
unsigned long *maskp,
|
unsigned long *maskp,
|
||||||
unsigned long *posp)
|
unsigned long *posp)
|
||||||
{
|
{
|
||||||
int k;
|
unsigned int k;
|
||||||
|
|
||||||
*mapped_regp = sh_pfc_phys_to_virt(pfc, crp->reg);
|
*mapped_regp = sh_pfc_phys_to_virt(pfc, crp->reg);
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ static int sh_pfc_get_config_reg(struct sh_pfc *pfc, u16 enum_id,
|
||||||
{
|
{
|
||||||
const struct pinmux_cfg_reg *config_reg;
|
const struct pinmux_cfg_reg *config_reg;
|
||||||
unsigned long r_width, f_width, curr_width, ncomb;
|
unsigned long r_width, f_width, curr_width, ncomb;
|
||||||
int k, m, n, pos, bit_pos;
|
unsigned int k, m, n, pos, bit_pos;
|
||||||
|
|
||||||
k = 0;
|
k = 0;
|
||||||
while (1) {
|
while (1) {
|
||||||
|
@ -238,7 +238,7 @@ static int sh_pfc_mark_to_enum(struct sh_pfc *pfc, u16 mark, int pos,
|
||||||
u16 *enum_idp)
|
u16 *enum_idp)
|
||||||
{
|
{
|
||||||
const u16 *data = pfc->info->gpio_data;
|
const u16 *data = pfc->info->gpio_data;
|
||||||
int k;
|
unsigned int k;
|
||||||
|
|
||||||
if (pos) {
|
if (pos) {
|
||||||
*enum_idp = data[pos + 1];
|
*enum_idp = data[pos + 1];
|
||||||
|
|
|
@ -204,7 +204,7 @@ static void gpio_pin_set(struct gpio_chip *gc, unsigned offset, int value)
|
||||||
static int gpio_pin_to_irq(struct gpio_chip *gc, unsigned offset)
|
static int gpio_pin_to_irq(struct gpio_chip *gc, unsigned offset)
|
||||||
{
|
{
|
||||||
struct sh_pfc *pfc = gpio_to_pfc(gc);
|
struct sh_pfc *pfc = gpio_to_pfc(gc);
|
||||||
int i, k;
|
unsigned int i, k;
|
||||||
|
|
||||||
for (i = 0; i < pfc->info->gpio_irq_size; i++) {
|
for (i = 0; i < pfc->info->gpio_irq_size; i++) {
|
||||||
unsigned short *gpios = pfc->info->gpio_irq[i].gpios;
|
unsigned short *gpios = pfc->info->gpio_irq[i].gpios;
|
||||||
|
|
Loading…
Reference in a new issue