Skip to contentSkip to conversation

Moxa Driver Update to 2.6.30

DISCUSSION Gerhard Wiesinger 1 participant 2 messages Sep 15, 2009 – Sep 16, 2009

lore
Share & tools
lore
#0 lore raw

Hello,

In Kernel 2.6.29 the moxa 5110 driver compiled well. In 2.6.30 some deprecated definitions have been removed.

/usr/src/kernels/2.6.29.6-217.2.16.fc11.x86_64/include/linux/sched.h:
struct signal_struct {

        union {
                pid_t session __deprecated;
                pid_t __session;
        };

static inline pid_t task_session_nr(struct task_struct *tsk)

{
        return tsk->signal->__session;
}

Code is used in the way:
npreal2.h:
#if (LINUX_VERSION_CODE >= VERSION_CODE(2,6,5))
#if (LINUX_VERSION_CODE >= VERSION_CODE(2,6,20))
#if (LINUX_VERSION_CODE >= VERSION_CODE(2,6,26))
#define MX_SESSION() task_session_nr(current)
#else
#define MX_SESSION() (pid_t)tty->session
#endif
#else
#define MX_SESSION() current->signal->session
#endif
#else
#define MX_SESSION() current->session
#endif

What's the correct change for the definition of MX_SESSION in 2.6.30? (Didn't find any useful replacement)

Moxa driver files source files can be found at:
http://www.moxa.com/drivers/DN_Driver/Linux/npreal2_1.16_Build_09030513.tgz

Thnx.

Ciao,
Gerhard

--
http://www.wiesinger.com/

#1 lore raw

Hello,

Noone has an idea?

Thnx.

Ciao,
Gerhard

--
http://www.wiesinger.com/

Quoted 52 lines · Gerhard Wiesinger

Hello,

In Kernel 2.6.29 the moxa 5110 driver compiled well. In 2.6.30 some deprecated definitions have been removed.

/usr/src/kernels/2.6.29.6-217.2.16.fc11.x86_64/include/linux/sched.h:
struct signal_struct {

       union {
               pid_t session __deprecated;
               pid_t __session;
       };

static inline pid_t task_session_nr(struct task_struct *tsk)

{
       return tsk->signal->__session;
}

Code is used in the way:
npreal2.h:
#if (LINUX_VERSION_CODE >= VERSION_CODE(2,6,5))
#if (LINUX_VERSION_CODE >= VERSION_CODE(2,6,20))
#if (LINUX_VERSION_CODE >= VERSION_CODE(2,6,26))
#define MX_SESSION() task_session_nr(current)
#else
#define MX_SESSION() (pid_t)tty->session
#endif
#else
#define MX_SESSION() current->signal->session
#endif
#else
#define MX_SESSION() current->session
#endif

What's the correct change for the definition of MX_SESSION in 2.6.30? (Didn't find any useful replacement)

Moxa driver files source files can be found at:
http://www.moxa.com/drivers/DN_Driver/Linux/npreal2_1.16_Build_09030513.tgz

Thnx.

Ciao,
Gerhard

--
http://www.wiesinger.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/