It is referring to the same thing. Romans 7:25 uses the word "mind." The context of that passage is not doing what you know is right. The fight between mind and flesh.
In Galatians 5:17 the same battle is described that we know is the mind. We know it is NOT the Spirit because there is no struggle when you are in the Spirit. And verse 18 confirms it.
Only when you are born again is the Holy Spirit in our own spirit, but not before.
You're just changing what it says because you want it to say something different.