Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I am working on linux for OMAP 1510. I am writing a driver that will call routines present in the sound driver (specifically ones in omap-audio.c). the function I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2004
    Location
    Bangalore
    Posts
    2

    doubts regarding EXPORT_SYMBOL & other questions


    Hi,

    I am working on linux for OMAP 1510. I am writing a driver that will call routines present in the sound driver (specifically ones in omap-audio.c). the function I want to call are audio_write and audio_read.

    Now.

    1)Do I need to include the header file (with function declarations ) of the driver (omap-audio.c), which has the EXPORT_SYMBOL code, in order to call the exported function? omap-audio.c does not have a header file ?

    2) I am trying to compile my driver module and I am getting a weird error.

    The error is as follows

    ----------------------------------------------------------------------
    In file included from /home/bharat/linux-2.4.20_mvlcee30/include/linux/fs.h:215,
    from sound_interface.c:4:
    /home/bharat/linux-2.4.20_mvlcee30/include/asm/semaphore.h: In function `down':
    /home/bharat/linux-2.4.20_mvlcee30/include/asm/semaphore.h:88: unknown register name `lr' in `asm'
    /home/bharat/linux-2.4.20_mvlcee30/include/asm/semaphore.h:88: unknown register name `ip' in `asm'
    /home/bharat/linux-2.4.20_mvlcee30/include/asm/semaphore.h: In function `down_interruptible':
    /home/bharat/linux-2.4.20_mvlcee30/include/asm/semaphore.h:101: unknown register name `lr' in `asm'
    /home/bharat/linux-2.4.20_mvlcee30/include/asm/semaphore.h:101: unknown register name `ip' in `asm'
    /home/bharat/linux-2.4.20_mvlcee30/include/asm/semaphore.h: In function `down_trylock':
    /home/bharat/linux-2.4.20_mvlcee30/include/asm/semaphore.h:110: unknown register name `lr' in `asm'
    /home/bharat/linux-2.4.20_mvlcee30/include/asm/semaphore.h:110: unknown register name `ip' in `asm'
    /home/bharat/linux-2.4.20_mvlcee30/include/asm/semaphore.h: In function `up':
    /home/bharat/linux-2.4.20_mvlcee30/include/asm/semaphore.h:125: unknown register name `lr' in `asm'
    /home/bharat/linux-2.4.20_mvlcee30/include/asm/semaphore.h:125: unknown register name `ip' in `asm'

    -------------------------------------------------------------

    I am including the following

    #include <linux/kernel.h>
    #include <linux/module.h>
    #include <linux/config.h>
    #include <linux/fs.h>
    #include <linux/miscdevice.h>
    #include <linux/poll.h>

    if i change the order to include, lets say, poll.h first then the same error occurs because of a file included by poll.h instead of fs.h as shown in the error message.

    Any ideas why this error message occurs.

  2. #2
    Just Joined!
    Join Date
    Dec 2004
    Location
    Bangalore
    Posts
    2

    More info

    I am working on Linux 2.4 and my make file is like this

    KERNELDIR=/home/bharat/linux-2.4.20_mvlcee30


    include $(KERNELDIR)/.config

    CFLAGS = -D__KERNEL__ -DMODULE -I$(KERNELDIR)/include -I. -o -Wall

    ifdef CONFIG_SMP
    CFLAGS += -D__SMP__ -DSMP
    endif

    all: sound.o

    sound.o: sound_interface.o
    $(ld) -r $(CC) -o $(CFLAGS)

    clean:
    rm -f *.o *~ core

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •