Prev: [PATCH TRIVIAL 2.6.34-rc1] fix TTY_BUFFER_PAGE double space typo
Next: page-allocator: Under memory pressure, wait on pressure to relieve instead of congestion
From: Hennerich, Michael on 9 Mar 2010 08:10 Skip trailing newline if available. Signed-off-by: Michael Hennerich <Michael.Hennerich(a)analog.com> Acked-by: Jonathan Cameron <jic23(a)cam.ac.uk> Index: drivers/staging/iio/industrialio-trigger.c =================================================================== --- drivers/staging/iio/industrialio-trigger.c (revision 8368) +++ drivers/staging/iio/industrialio-trigger.c (working copy) @@ -155,6 +155,9 @@ struct iio_trigger *trig; bool found = false; + if (len && name[len - 1] == '\n') + len--; + mutex_lock(&iio_trigger_list_lock); list_for_each_entry(trig, &iio_trigger_list, list) { if (strncmp(trig->name, name, len) == 0) { ------------------------------------------------------------------ ********* Analog Devices GmbH Open Platform Solutions ** ***** ** ** Wilhelm-Wagenfeld-Strasse 6 ** ***** D-80807 Munich ********* Germany Registergericht M�nchen HRB 40368, Gesch�ftsf�hrer: Thomas Wessel, William A. Martin, Margaret K. Seif -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |