Getting a mtd_info with a valid map.

David Woodhouse dwmw2 at infradead.org
Wed Jun 18 06:54:20 EDT 2003


On Wed, 2003-06-18 at 11:45, Ken Gordon wrote:
> I'm trying to read the serial number from my Intel Strataflash (J3) suing
> mtd->read_user_prot_reg and mtd->read_fact_prot_reg. This code below looks
> to me like it should do the job but explodes because the mtd_info returned
> by get_mtd_device has a NULL priv field.

I don't understand. When the 'map' is NULL you still call
mtd->read_user_prot_reg() anyway... doesn't it work?

What do you think that 'priv' is an abbreviation for, by the way? Under
what circumstances do you think a programmer would name a variable like
that? :)

-- 
dwmw2




More information about the linux-mtd mailing list