Re: [PATCH] davinci: MMC: Pass number of SG segments as platform data

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Kevin Hilman
Date: Thursday, March 11, 2010 - 4:39 pm

Sudhakar Rajashekhara <sudhakar.raj@ti.com> writes:


[...]


If a board doesn't setup pdata->nr_sg it will be zero, leaving
host->nr_sg = -1.


Since host->nr_sg is unsigned, you get lucky and fix it up here, but
for readability, this not too clean and should be more thorough.

Wrapping the above in 'if (pdata->nr_sg)' is a more standard way
of handling optional platform_data paramaters.

Kevin
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] davinci: MMC: Pass number of SG segments as platfo ..., Sudhakar Rajashekhara, (Thu Mar 11, 12:32 am)
Re: [PATCH] davinci: MMC: Pass number of SG segments as pl ..., Kevin Hilman, (Thu Mar 11, 4:39 pm)