mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bhuvan Kumar MITTAL <bhuvan.mittal@st.com>
To: <linux-kernel@vger.kernel.org>
Cc: "'Bhuvan Kumar MITTAL'" <bhuvan.mittal@st.com>
Subject: exporting variables across modules
Date: Fri, 11 May 2007 09:02:01 +0530	[thread overview]
Message-ID: <005601c7937c$f5416580$142ec70a@dlh.st.com> (raw)

I have 2 kernel modules. In one module I have 2 global pointers(of type unsigned char and int respectively). I'd like to use these 2 pointers in the other module. I am adopting the following approach but not really sure whether its right or not:

1. I have exported both the pointers using EXPORT_SYMBOL(sym1) and EXPORT_SYMBOL(sym2)

2. Then in the module in which I want to use these pointers I have declared these 2 pointers as global extern variables as:
	extern unsigned char * sym1;
	extern unsigned int * sym2;

Is this the right way to use these pointers? Kindly guide me.

Regards,

Bhuvan



                 reply	other threads:[~2007-05-11  3:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='005601c7937c$f5416580$142ec70a@dlh.st.com' \
    --to=bhuvan.mittal@st.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®