Dmitry Torokhov wrote on 2011-10-19: > Hi Michael, > > On Thu, Oct 13, 2011 at 08:18:46AM +0200, michael.hennerich@xxxxxxxxxx > wrote: >> static void __devinit adp5589_report_switch_state(struct adp5589_kpad >> *kpad) { >> - int gpi_stat1 = adp5589_read(kpad->client, ADP5589_GPI_STATUS_A); >> - int gpi_stat2 = adp5589_read(kpad->client, ADP5589_GPI_STATUS_B); >> - int gpi_stat3 = adp5589_read(kpad->client, ADP5589_GPI_STATUS_C); >> - int gpi_stat_tmp, pin_loc; >> + int gpi_stat_tmp, pin_loc, gpi_stat3; >> int i; >> + int gpi_stat1 = adp5589_read(kpad->client, >> + kpad->var->reg(ADP5589_GPI_STATUS_A)); >> + int gpi_stat2 = adp5589_read(kpad->client, >> + kpad->var->reg(ADP5589_GPI_STATUS_B)); >> + if (!kpad->is_adp5585) >> + gpi_stat3 = adp5589_read(kpad->client, > ADP5589_GPI_STATUS_C); > > This cause my compiler to complain that gpi_stat3 might be used > uninitialized; I changed it to > > int gpi_stat3 = !kpad->is_adp5585 ? > adp5589_read(kpad->client, ADP5589_GPI_STATUS_C) : 0; > > and applied. > > Thanks. That works - Thanks! Greetings, Michael -- Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368; Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin, Margaret Seif -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html