public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Justin Treon <justin_treon@yahoo.com>
To: Josh Boyer <jwboyer@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Adding a function pointer to mtd_info struct
Date: Wed, 23 Jan 2008 16:43:34 -0800 (PST)	[thread overview]
Message-ID: <504404.99599.qm@web43132.mail.sp1.yahoo.com> (raw)
In-Reply-To: <20080123161324.45ea71e3@zod.rchland.ibm.com>

> > I am trying to add some new features in my kernel to cfi_cmd_0001.c for a test
> chip.
> >  I added a new field to the mtd_info struct in mtd.h and inserted the function
> > pointer into the mtd->overwrite field I added in cfi_cmd_0001.c, but when I try
> to
> > use mtd->overwrite in mtdblock.c the pointer is set to NULL.  
> > 
> > In the mtd_info struct in include/mtd/mtd.h I addded:
> > 	int (*overwrite) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,
> > const u_char *buf);
> > 
> > In cfi_cmd_0001.c I added:
> > 	mtd->overwrite = cfi_intelext_overwrite_buffers;
> > 
> > What file or field do I need to modify to make new function accessible from
> > mtdblock.c?
> 
> Just post a patch of what you did.  It'll be easier to help you.
> 

I figured it out.  I did not realize I had to edit the mtd-parts file as well. Thank
you Josh.

Justin



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

      reply	other threads:[~2008-01-24  0:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-23 17:28 Adding a function pointer to mtd_info struct Justin Treon
2008-01-23 22:13 ` Josh Boyer
2008-01-24  0:43   ` Justin Treon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=504404.99599.qm@web43132.mail.sp1.yahoo.com \
    --to=justin_treon@yahoo.com \
    --cc=jwboyer@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox